X-Git-Url: https://git.cweiske.de/phinde.git/blobdiff_plain/cbefad7ddd4927b1bbe225fec540a082c15f5403..6c95d7fe170a54449755a8b571a191a3aaaf954e:/src/phinde/Queue.php?ds=sidebyside diff --git a/src/phinde/Queue.php b/src/phinde/Queue.php index 1033d7a..a8ead3d 100644 --- a/src/phinde/Queue.php +++ b/src/phinde/Queue.php @@ -43,10 +43,14 @@ class Queue $cmd = 'gearadmin --status' . '| grep ' . escapeshellarg($this->queueName); $line = exec($cmd); - - $parts = preg_split('#\s+#', $line); - if (count($parts) !== 4) { - throw new \Exception('gearadmin status line does not have 4 parts'); + if ($line === '') { + //job not registered + $parts = [0, -1, -1, -1]; + } else { + $parts = preg_split('#\s+#', $line); + if (count($parts) !== 4) { + throw new \Exception('gearadmin status line does not have 4 parts'); + } } return array(