Attempts to fix index sahrd notice, a=chris

Chris Pollett [2015-09-04 00:Sep:th]
Attempts to fix index sahrd notice, a=chris
Filename
src/library/IndexShard.php
diff --git a/src/library/IndexShard.php b/src/library/IndexShard.php
index 02bb4b32b..655fdd899 100644
--- a/src/library/IndexShard.php
+++ b/src/library/IndexShard.php
@@ -582,8 +582,14 @@ class IndexShard extends PersistentStructure implements
             $this->num_docs_per_generation * $this->generation, 10);
         $item[self::DOC_RANK] = number_format(10 - $doc_depth, C\PRECISION);
         $doc_loc = $doc_index << 4;
-        list(, $item[self::SUMMARY_OFFSET], $doc_int) =
+        $tmp =
             unpack("N*", $this->getDocInfoSubstring($doc_loc, $doc_key_len));
+        if (isset($tmp[2])) {
+            list(, $item[self::SUMMARY_OFFSET], $doc_int) = $tmp;
+        } else {
+            $item[self::SUMMARY_OFFSET] = false;
+            $doc_int  = false;
+        }
         $num_keys = $doc_int & 255;
         if ($num_keys > 15) { /* shouldn't have more than this many keys
                                 fighting index corruption
ViewGit