Skip to content

Commit

Permalink
Merge pull request #45 from Webelys-PS/issue-44
Browse files Browse the repository at this point in the history
Don't try to delete a cronjob if does'nt exist
  • Loading branch information
PierreRambaud authored Oct 21, 2019
2 parents bd6c064 + 132f44d commit 0748385
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 0748385

Please sign in to comment.