]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix types on RPC counter replies
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Oct 2012 08:50:13 +0000 (12:50 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Oct 2012 08:50:15 +0000 (12:50 +0400)
include/functions.php

index c03fd9975b92025801889849c85baf041feaa464..dacd45d0297d87429bfc5dfb6471c53285e08a6b 100644 (file)
                /* Special case: NULL category doesn't actually exist in the DB */
 
                $cv = array("id" => 0, "kind" => "cat",
-                       "counter" => ccache_find($link, 0, $_SESSION["uid"], true));
+                       "counter" => (int) ccache_find($link, 0, $_SESSION["uid"], true));
 
                array_push($ret_arr, $cv);
 
                }
 
                $cv = array("id" => "global-unread",
-                       "counter" => $global_unread);
+                       "counter" => (int) $global_unread);
 
                array_push($ret_arr, $cv);
 
                $subscribed_feeds = db_fetch_result($result, 0, "fn");
 
                $cv = array("id" => "subscribed-feeds",
-                       "counter" => $subscribed_feeds);
+                       "counter" => (int) $subscribed_feeds);
 
                array_push($ret_arr, $cv);
 
                        $count = getFeedUnread($link, $i);
 
                        $cv = array("id" => $i,
-                               "counter" => $count);
+                               "counter" => (int) $count);
 
 //                     if (get_pref($link, 'EXTENDED_FEEDLIST'))
 //                             $cv["xmsg"] = getFeedArticles($link, $i)." ".__("total");
                        $count = getFeedUnread($link, $id);
 
                        $cv = array("id" => $id,
-                               "counter" => $count);
+                               "counter" => (int) $count);
 
                        if ($descriptions)
                                $cv["description"] = $label_name;
 
                        $cv = array("id" => $id,
                                "updated" => $last_updated,
-                               "counter" => $count,
+                               "counter" => (int) $count,
                                "has_img" => (int) $has_img);
 
                        if ($last_error)