aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 16:46:48 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 16:46:48 +0000
commitac39d8a06f422887cf256d77a096c03783dd349e (patch)
tree238561575b6d18cb5710733c6ae92d0f3f277169 /engine/classes
parent3b280cf0fdb3b08ab91a32e491f73bdb0ee2c96c (diff)
downloadelgg-ac39d8a06f422887cf256d77a096c03783dd349e.tar.gz
elgg-ac39d8a06f422887cf256d77a096c03783dd349e.tar.bz2
Additional checking in ElggBatch for valid key.
git-svn-id: http://code.elgg.org/elgg/trunk@8200 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggBatch.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/classes/ElggBatch.php b/engine/classes/ElggBatch.php
index 0429e94ff..96a35f238 100644
--- a/engine/classes/ElggBatch.php
+++ b/engine/classes/ElggBatch.php
@@ -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);
}