]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
If using a callback in ElggBatch, make sure there's an initial value to return.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 23:52:15 +0000 (23:52 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 13 Feb 2011 23:52:15 +0000 (23:52 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8212 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggBatch.php

index 96a35f238998bb95daef6e63da1d84f9eaa93ade..4f8f6cae91362d3c925c3a2fc2f4101ed3396545 100644 (file)
@@ -172,6 +172,8 @@ class ElggBatch
                if ($callback && is_callable($callback)) {
                        $batch = new ElggBatch($getter, $options, null, $chunk_size);
 
+                       $all_results = null;
+
                        foreach ($batch as $result) {
                                if (is_string($callback)) {
                                        $result = $callback($result, $getter, $options);