Fix count being called on the wrong variable in mod/notes
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 9 Sep 2018 22:33:14 +0000 (18:33 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 9 Sep 2018 22:34:05 +0000 (18:34 -0400)
mod/notes.php

index 68a870e..01f2838 100644 (file)
@@ -70,8 +70,11 @@ function notes_content(App $a, $update = false)
        $count = 0;
 
        if (DBA::isResult($r)) {
-               $count = count($r);
-               $o .= conversation($a, DBA::toArray($r), 'notes', $update);
+               $notes = DBA::toArray($r);
+
+               $count = count($notes);
+
+               $o .= conversation($a, $notes, 'notes', $update);
        }
 
        $o .= alt_pager($a, $count);