]> git.mxchange.org Git - friendica.git/commitdiff
Fixed possibble "Trying to access array offset on value of type bool" E_NOTICE
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2020 21:34:43 +0000 (22:34 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 08:07:41 +0000 (10:07 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/Database/PostUpdate.php

index 6d744a1ba1a26e1db2102fad690af49bc96212e9..7e03d7e67847bbdf8cad43bd9ddad4e2b0acf6bc 100644 (file)
@@ -133,7 +133,7 @@ class PostUpdate
                }
 
                $max_item_delivery_data = DBA::selectFirst('item-delivery-data', ['iid'], ['queue_count > 0 OR queue_done > 0'], ['order' => ['iid']]);
-               $max_iid = $max_item_delivery_data['iid'];
+               $max_iid = (is_array($max_item_delivery_data) && isset($max_item_delivery_data['iid']) ? $max_item_delivery_data['iid'] : 0);
 
                Logger::info('Start update1297 with max iid: ' . $max_iid);