From 7b899a01ef248b413e29b2e4832101c6ba56e61b Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Tue, 11 Jul 2023 17:02:45 +0200 Subject: [PATCH] Fix exit condition in DaemonCommand.php The code change fixes the exit condition in the DaemonCommand.php file. Previously, the code would exit if `$pid` was equal to 0, but now it will only exit if `$pid` is set and equal to 0. This ensures that the correct condition is checked before exiting. --- src/Command/DaemonCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/DaemonCommand.php b/src/Command/DaemonCommand.php index 7e46a4c..fbaa03a 100644 --- a/src/Command/DaemonCommand.php +++ b/src/Command/DaemonCommand.php @@ -82,7 +82,7 @@ class DaemonCommand extends Command if((!$async || $pid == -1) || $pid == 0) { $result = $jobRepo->RunJob($job, $manual); if ($result['status'] == 'ran') $jobRepo->setJobRunning($job, false); - if ($pid == 0) exit; + if (isset($pid) && $pid == 0) exit; } unset($jobsToRun[$key]); unset($job);