Merge pull request #7932 from MrPetovan/bug/fatal-errors

Log a message when data isn't the expected type in GContact::updateFromOutbox
This commit is contained in:
Tobias Diekershoff 2019-12-11 18:36:36 +01:00 committed by GitHub
commit 9d626516d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -876,7 +876,11 @@ class GContact
self::updateFromOutbox($outbox['first']['href'], $data); self::updateFromOutbox($outbox['first']['href'], $data);
return; return;
} elseif (!empty($outbox['first'])) { } 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; return;
} else { } else {
$items = []; $items = [];