Fix premature iterator closure error in Wall.getMyNotes

This commit is contained in:
celestora 2023-07-06 11:47:53 +03:00
parent 070ea16536
commit 5ca9e2808c

View file

@ -76,10 +76,11 @@ class Wall implements Handler
function getMyNotes(callable $resolve, callable $reject)
{
$myNotes = $this->notes->getUserNotes($this->user, 1, $this->notes->getUserNotesCount($this->user));
$count = $this->notes->getUserNotesCount($this->user);
$myNotes = $this->notes->getUserNotes($this->user, 1, $count);
$arr = [
"count" => sizeof($myNotes),
"count" => $count,
"closed" => $this->user->getPrivacySetting("notes.read"),
"items" => [],
];