fix: don't delete if we don't have any IDs

#313
This commit is contained in:
Martin Ambrus
2017-11-19 19:24:10 +01:00
parent 0df4de9413
commit 609a61fc3e
+3 -1
View File
@@ -750,7 +750,9 @@ class Automation {
}
// delete all processed entries
$database->query("DELETE FROM ".TB_PREFIX."bdata WHERE id IN(".implode(',', $dbIdsToDelete).")");
if (count($dbIdsToDelete)) {
$database->query( "DELETE FROM " . TB_PREFIX . "bdata WHERE id IN(" . implode( ',', $dbIdsToDelete ) . ")" );
}
if(file_exists("GameEngine/Prevention/build.txt")) {
unlink("GameEngine/Prevention/build.txt");