summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclasses/rpc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index 4f6a2fe1d..dbb54cec5 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -108,8 +108,8 @@ class RPC extends Handler_Protected {
function getAllCounters(): void {
@$seq = (int) $_REQUEST['seq'];
- $feed_id_count = (int)$_REQUEST["feed_id_count"];
- $label_id_count = (int)$_REQUEST["label_id_count"];
+ $feed_id_count = (int) ($_REQUEST["feed_id_count"] ?? -1);
+ $label_id_count = (int) ($_REQUEST["label_id_count"] ?? -1);
// it seems impossible to distinguish empty array [] from a null - both become unset in $_REQUEST
// so, count is >= 0 means we had an array, -1 means null