mirror of
https://github.com/openvk/openvk
synced 2025-04-23 00:23:01 +03:00
Patch array objects for PHP 8
This commit is contained in:
parent
e3b9fb9f41
commit
2ee9f5d22c
3 changed files with 6 additions and 6 deletions
|
@ -74,7 +74,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$this->template->paginatorConf = (object) [
|
||||
"count" => $this->template->count,
|
||||
"page" => (int) ($_GET["p"] ?? 1),
|
||||
"amount" => sizeof($this->template->posts),
|
||||
"amount" => sizeof((array)$this->template->posts),
|
||||
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
||||
];
|
||||
|
||||
|
@ -152,7 +152,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
->where("deleted", 0)
|
||||
->order("created DESC");
|
||||
$this->template->paginatorConf = (object) [
|
||||
"count" => sizeof($posts),
|
||||
"count" => sizeof((array)$posts),
|
||||
"page" => (int) ($_GET["p"] ?? 1),
|
||||
"amount" => sizeof($posts->page((int) ($_GET["p"] ?? 1), $perPage)),
|
||||
"perPage" => $perPage,
|
||||
|
@ -182,7 +182,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$this->template->paginatorConf = (object) [
|
||||
"count" => $count,
|
||||
"page" => (int) ($_GET["p"] ?? 1),
|
||||
"amount" => sizeof($posts),
|
||||
"amount" => sizeof((array)$posts),
|
||||
"perPage" => $pPage,
|
||||
];
|
||||
foreach($posts as $post)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{/block}
|
||||
|
||||
{block content}
|
||||
{var $amount = sizeof($logs)}
|
||||
{var $amount = sizeof((array)$logs)}
|
||||
|
||||
<style>
|
||||
del, ins { text-decoration: none; color: #000; }
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
{include "../components/paginator.xml", conf => (object) [
|
||||
"page" => $page,
|
||||
"count" => $count,
|
||||
"amount" => sizeof($data),
|
||||
"amount" => sizeof((array)$data),
|
||||
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
|
||||
"atBottom" => false,
|
||||
]}
|
||||
|
@ -356,4 +356,4 @@
|
|||
<input class="button" type="button" id="dnt" value="{_reset}" onclick="resetSearch()">
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{/block}
|
||||
|
|
Loading…
Reference in a new issue