[BUGFIX] Properly check serialized_executions to avoid PHP 7.2 warnings 84/55484/3
authorOliver Hader <oliver@typo3.org>
Mon, 29 Jan 2018 11:59:02 +0000 (12:59 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 29 Jan 2018 12:35:00 +0000 (13:35 +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/55484
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/scheduler/Classes/Task/AbstractTask.php

index e11e76a..fcde4ad 100644 (file)
@@ -399,7 +399,7 @@ abstract class AbstractTask
         $res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryArr);
         $runningExecutions = [];
         if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-            if ($row['serialized_executions'] !== '') {
+            if (!empty($row['serialized_executions'])) {
                 $runningExecutions = unserialize($row['serialized_executions']);
             }
         }