[BUGFIX] Properly check `serialized_executions` to avoid warnings with PHP 7.2 74/55474/5
authorGeorg Ringer <georg.ringer@gmail.com>
Sun, 28 Jan 2018 11:42:17 +0000 (12:42 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 29 Jan 2018 11:52:40 +0000 (12:52 +0100)
To avoid warnings with PHP 7.2, `serialized_executions` must be checked
for being not an empty value.

Resolves: #83691
Releases: master, 8.7, 7.6
Change-Id: I5855a03d6669ec0e82931cfc0110c2b7ca134ad4
Reviewed-on: https://review.typo3.org/55474
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/scheduler/Classes/Task/AbstractTask.php

index 9fc0ee3..4ea61ae 100644 (file)
@@ -430,7 +430,7 @@ abstract class AbstractTask implements LoggerAwareInterface
             ->fetch();
 
         $runningExecutions = [];
-        if ($row && $row['serialized_executions'] !== '') {
+        if ($row && !empty($row['serialized_executions'])) {
             $runningExecutions = unserialize($row['serialized_executions']);
         }
         // Count the number of existing executions and use that number as a key