From: Roland Häder Date: Tue, 31 Jul 2018 02:24:32 +0000 (+0200) Subject: Fixed fatal error: (#5532) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2c0ad47dfc3be0ebda45569aded5e1cd6f4825a2;p=friendica.git Fixed fatal error: (#5532) * Fixed fatal error: ```` PHP Fatal error: Uncaught TypeError: Argument 1 passed to add_page_info_data() must be of the type array, boolean given, called in /var/www/../include/items.php on line 153 and defined in /var/www/../include/items.php:27 ```` Fix for type-hint array when query_page_info() returned a non-array, this may happen when the instance/node/pod owner decided to shutdown server and replace all URLs with a replacement message. * Fixed parser error, ops. --- diff --git a/include/items.php b/include/items.php index 0d447f2b40..34d6132f01 100644 --- a/include/items.php +++ b/include/items.php @@ -150,7 +150,11 @@ function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, { $data = query_page_info($url, $photo, $keywords, $keyword_blacklist); - $text = add_page_info_data($data, $no_photos); + $text = ''; + + if (is_array($data)) { + $text = add_page_info_data($data, $no_photos); + } return $text; }