]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly check for entry id array being present before iterating it in mobile/classic...
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 7 Apr 2010 07:46:39 +0000 (11:46 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 7 Apr 2010 07:46:39 +0000 (11:46 +0400)
mobile/classic/functions.php

index 05409d630f660c1d60f0ed26447189591890f337..c7acba79e12fed904e27d7f1921e04e507fde336 100644 (file)
                }
 
                if ($catchup_op == "selection") {
-                       $ids_to_mark = array_keys($_GET["sel_ids"]);
-                       if ($ids_to_mark) {
-                               foreach ($ids_to_mark as $id) {
-                                       db_query($link, "UPDATE ttrss_user_entries SET 
-                                               unread = false,last_read = NOW()
-                                               WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
+                       if (is_array($_GET["sel_ids"])) {
+                               $ids_to_mark = array_keys($_GET["sel_ids"]);
+                               if ($ids_to_mark) {
+                                       foreach ($ids_to_mark as $id) {
+                                               db_query($link, "UPDATE ttrss_user_entries SET 
+                                                       unread = false,last_read = NOW()
+                                                       WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
+                                       }
                                }
                        }
                }