[BUGFIX] PHP7.2: Check value for NULL before count 39/53939/3
authorAlexander Opitz <opitz.alexander@googlemail.com>
Thu, 7 Sep 2017 07:48:21 +0000 (09:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 8 Sep 2017 08:28:25 +0000 (10:28 +0200)
Resolves: #82322
Releases: master, 8.7, 7.6
Change-Id: I31f7bc2db61337e10be7ffd44ac294b77c44d07b
Reviewed-on: https://review.typo3.org/53939
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 27a4b53..bb61317 100644 (file)
@@ -1875,7 +1875,10 @@ class DataHandler
             );
         }
 
-        $itemC = count($items);
+        $itemC = 0;
+        if ($items !== null) {
+            $itemC = count($items);
+        }
         if (!$itemC) {
             $itemC = 1;
         }