PHP 8 FIX WATAFAK

This commit is contained in:
lalka2018 2023-11-15 22:41:18 +03:00
parent 12775d0a09
commit 029ce27e41
3 changed files with 3 additions and 3 deletions

View file

@ -132,7 +132,7 @@ class Wall implements Handler
]; ];
foreach($videos as $video) { foreach($videos as $video) {
$res = json_decode(json_encode($video->toVkApiStruct()), true); $res = json_decode(json_encode($video->toVkApiStruct($this->user)), true);
$res["video"]["author_name"] = $video->getOwner()->getCanonicalName(); $res["video"]["author_name"] = $video->getOwner()->getCanonicalName();
$arr["items"][] = $res; $arr["items"][] = $res;

View file

@ -448,11 +448,11 @@ final class GroupPresenter extends OpenVKPresenter
} }
if(!$club->canBeModifiedBy($this->user->identity)) { if(!$club->canBeModifiedBy($this->user->identity)) {
$this->template->posts = (new Posts)->getSuggestedPostsByUser($club->getId(), $this->user->id, (int) ($this->queryParam("p") ?? 1)); $this->template->posts = iterator_to_array((new Posts)->getSuggestedPostsByUser($club->getId(), $this->user->id, (int) ($this->queryParam("p") ?? 1)));
$this->template->count = (new Posts)->getSuggestedPostsCountByUser($club->getId(), $this->user->id); $this->template->count = (new Posts)->getSuggestedPostsCountByUser($club->getId(), $this->user->id);
$this->template->type = "my"; $this->template->type = "my";
} else { } else {
$this->template->posts = (new Posts)->getSuggestedPosts($club->getId(), (int) ($this->queryParam("p") ?? 1)); $this->template->posts = iterator_to_array((new Posts)->getSuggestedPosts($club->getId(), (int) ($this->queryParam("p") ?? 1)));
$this->template->count = (new Posts)->getSuggestedPostsCount($club->getId()); $this->template->count = (new Posts)->getSuggestedPostsCount($club->getId());
$this->template->type = "everyone"; $this->template->type = "everyone";
} }