Skip to content

Commit

Permalink
Don't try to delete a cronjob if does'nt exist
Browse files Browse the repository at this point in the history
* solve #44
  • Loading branch information
camlafit committed Oct 21, 2019
1 parent bd6c064 commit 132f44d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cronjobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 132f44d

Please sign in to comment.