]> git.mxchange.org Git - friendica.git/commitdiff
Ensure task parameters is an array with at least 1 element in update_1404()
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 31 May 2021 05:12:50 +0000 (01:12 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 31 May 2021 12:29:50 +0000 (08:29 -0400)
- Address https://github.com/friendica/friendica/issues/10169#issuecomment-827182936

update.php

index 0a97b4e10cf01891ba033cc4dad6787303e575f5..551d208fe4230500c86afc1b8748525e9248c340 100644 (file)
@@ -835,7 +835,7 @@ function update_1404()
        while ($task = DBA::fetch($tasks)) {
                $parameters = json_decode($task['parameter'], true);
        
-               if (in_array($parameters[0], [Delivery::MAIL, Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) {
+               if (is_array($parameters) && count($parameters) && in_array($parameters[0], [Delivery::MAIL, Delivery::SUGGESTION, Delivery::REMOVAL, Delivery::RELOCATION])) {
                        continue;
                }