Tweak to word_iterator to see if stop yioop crashing, a=chris
Tweak to word_iterator to see if stop yioop crashing, a=chris
diff --git a/lib/index_bundle_iterators/word_iterator.php b/lib/index_bundle_iterators/word_iterator.php
index 401a03a00..3231ed08c 100644
--- a/lib/index_bundle_iterators/word_iterator.php
+++ b/lib/index_bundle_iterators/word_iterator.php
@@ -272,6 +272,10 @@ class WordIterator extends IndexBundleIterator
$results[$keys] = $data;
}
$this->count_block = count($results);
+ if($this->generation_pointer == $this->num_generations -1 &&
+ $results == array()) {
+ $results = NULL;
+ }
$this->pages = $results;
return $results;