Fixes PHP Warning: " array_unshift() expects parameter 1 to be array, int given"
authorMichael <heluecht@pirati.ca>
Wed, 24 Mar 2021 19:52:53 +0000 (19:52 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 24 Mar 2021 19:52:53 +0000 (19:52 +0000)
src/Core/Worker.php

index 56c6245..21140b8 100644 (file)
@@ -311,6 +311,10 @@ class Worker
                }
 
                $argv = json_decode($queue['parameter'], true);
+               if (!is_array($argv)) {
+                       $argv = [];
+               }
+
                if (!empty($queue['command'])) {
                        array_unshift($argv, $queue['command']);
                }