]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Additional checking in ElggBatch for valid key.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 16:46:48 +0000 (16:46 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 16:46:48 +0000 (16:46 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8200 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggBatch.php

index 0429e94ffb8c573d584aa5c3df9ad9e490f66fb2..96a35f238998bb95daef6e63da1d84f9eaa93ade 100644 (file)
@@ -339,6 +339,9 @@ class ElggBatch
         * @return bool
         */
        public function valid() {
+               if (!is_array($this->results)) {
+                       return false;
+               }
                $key = key($this->results);
                return ($key !== NULL && $key !== FALSE);
        }