Fix PHP 8 Fatal Error with already closed statement in mod/ping

- Address https://github.com/friendica/friendica/issues/10167#issuecomment-828941639
This commit is contained in:
Hypolite Petovan 2021-05-10 21:42:59 -04:00
parent 412a0b3e1c
commit 115da7a708

View file

@ -139,7 +139,7 @@ function ping_init(App $a)
local_user(), Verb::getID(Activity::FOLLOW)]; local_user(), Verb::getID(Activity::FOLLOW)];
$items = Post::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition); $items = Post::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
if (DBA::isResult($items)) { if (DBA::isResult($items)) {
$items_unseen = Post::toArray($items); $items_unseen = Post::toArray($items, false);
$arr = ['items' => $items_unseen]; $arr = ['items' => $items_unseen];
Hook::callAll('network_ping', $arr); Hook::callAll('network_ping', $arr);