]> git.mxchange.org Git - friendica.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 18 Jun 2022 13:56:58 +0000 (15:56 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Jun 2022 13:57:31 +0000 (15:57 +0200)
- prevents a "Return value of Friendica\Core\Worker::workerProcess() must be of the type array, bool returned"

src/Core/Worker.php

index bcd12f3294904eed7149f0e65010ee8403d104ec..62fd321c24b6a32d0800dac49979ebdea5ed765a 100644 (file)
@@ -1011,7 +1011,9 @@ class Worker
 
                DI::lock()->release(self::LOCK_PROCESS);
 
-               return (self::getWaitingJobForPID() ?? []);
+               // Prevents "Return value of Friendica\Core\Worker::workerProcess() must be of the type array, bool returned"
+               $process = self::getWaitingJobForPID();
+               return (is_array($process) ? $process : []);
        }
 
        /**