aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggBatch.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggBatch.php')
-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);
}