]> git.mxchange.org Git - friendica.git/commitdiff
Log a message when data isn't the expected type in GContact::updateFromOutbox
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:48:44 +0000 (08:48 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 11 Dec 2019 13:48:44 +0000 (08:48 -0500)
src/Model/GContact.php

index 95f1080f8d56570cdd87a2e522121c3024f98c79..2caad945919f04e9fe7d19af279b6c34b0a02517 100644 (file)
@@ -876,7 +876,11 @@ class GContact
                        self::updateFromOutbox($outbox['first']['href'], $data);
                        return;
                } elseif (!empty($outbox['first'])) {
-                       self::updateFromOutbox($outbox['first'], $data);
+                       if (is_string($outbox['first'])) {
+                               self::updateFromOutbox($outbox['first'], $data);
+                       } else {
+                               Logger::warning('Unexpected data', ['outbox' => $outbox]);
+                       }
                        return;
                } else {
                        $items = [];