Fixes a rare notice in index dictionary, a=chris
Fixes a rare notice in index dictionary, a=chris
diff --git a/lib/index_dictionary.php b/lib/index_dictionary.php
index 4c713b9a7..86303fbb0 100644
--- a/lib/index_dictionary.php
+++ b/lib/index_dictionary.php
@@ -580,7 +580,9 @@ class IndexDictionary implements CrawlConstants
if($prefix_info == IndexShard::BLANK) {
return false;
}
- list(, $offset, $high) = unpack("N*", $prefix_info);
+ $prefix_tmp = unpack("N*", $prefix_info);
+ if(!$prefix_tmp[2]) {return false; }
+ list(, $offset, $high) = $prefix_tmp;
$high--;
$start = self::PREFIX_HEADER_SIZE + $offset;
$low = 0;