mirror of
https://github.com/openvk/openvk
synced 2025-04-23 08:33:02 +03:00
PHP 8 FIX WATAFAK
This commit is contained in:
parent
12775d0a09
commit
029ce27e41
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue