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.
This commit is contained in:
parent
c39e0dcf2a
commit
2c0ad47dfc
1 changed files with 5 additions and 1 deletions
|
@ -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 = '';
|
||||
|
||||
if (is_array($data)) {
|
||||
$text = add_page_info_data($data, $no_photos);
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue