From 132f44da2d40e54c190df1f603f945b3fd3d652c Mon Sep 17 00:00:00 2001 From: camille lafitte Date: Fri, 30 Nov 2018 11:33:45 +0100 Subject: [PATCH] Don't try to delete a cronjob if does'nt exist * solve #44 --- cronjobs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronjobs.php b/cronjobs.php index ed4ea01..5270f8b 100755 --- a/cronjobs.php +++ b/cronjobs.php @@ -543,7 +543,7 @@ public function addNewModulesTasks() $id_module = (int)$cron['id_module']; $module = Module::getInstanceById((int)$cron['id_module']); - if ($module == false) { + if ($module == false && isset($cron['id_cronjob'])) { Db::getInstance()->execute(sprintf("DELETE FROM '%s' WHERE `id_cronjob` = '%s'", $table_name, (int)$cron['id_cronjob'])); break; }