better index manager error checking, a=chris
better index manager error checking, a=chris
diff --git a/src/library/IndexManager.php b/src/library/IndexManager.php
index e8e10f33a..761f78374 100644
--- a/src/library/IndexManager.php
+++ b/src/library/IndexManager.php
@@ -235,9 +235,15 @@ class IndexManager implements CrawlConstants
$feed_info[1], $feed_info[2], $feed_info[3]];
}
}
- list($total, $info) =
+ $pre_info =
$index->dictionary->getWordInfo($hash, true, $shift, $mask,
$threshold, $start_generation, $num_distinct_generations, true);
+ if (isset($pre_info[1])) {
+ list($total, $info) = $pre_info;
+ } else {
+ $total = 0;
+ $info = [];
+ }
if (isset($tmp[-1][3])) {
$total += $tmp[-1][3];
$info = $tmp + $info;