From 609a61fc3eec372ddc13b0494ef6ba711676ae6f Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 19 Nov 2017 19:24:10 +0100 Subject: [PATCH] fix: don't delete if we don't have any IDs #313 --- GameEngine/Automation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index b9b79b27..c624dedc 100755 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -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");