Add slight error handling in case where summaries not retrievable from a partition, a=chris

Chris Pollett [2021-09-10 17:Sep:th]
Add slight error handling in case where summaries not retrievable from a partition, a=chris
Filename
src/library/IndexDocumentBundle.php
src/views/StaticView.php
diff --git a/src/library/IndexDocumentBundle.php b/src/library/IndexDocumentBundle.php
index aa11dd305..da18a3038 100644
--- a/src/library/IndexDocumentBundle.php
+++ b/src/library/IndexDocumentBundle.php
@@ -425,6 +425,9 @@ class IndexDocumentBundle implements CrawlConstants
             $non_aux_doc_cnt++;
             if (!empty($url_info['doc'])) {
                 $site = $this->getSummary($url_info['doc'], $partition);
+                if (empty($site)) {
+                    continue;
+                }
             }
             $max_description_len ??= C\MAX_DESCRIPTION_LEN;
             $max_description_len = (empty($site[self::DESCRIPTION])) ?
@@ -438,6 +441,9 @@ class IndexDocumentBundle implements CrawlConstants
             } else {
                 foreach ($url_info['aux_docs'] as $aux_doc) {
                     $aux_site = $this->getSummary($aux_doc, $partition);
+                    if (empty($aux_site)) {
+                        continue;
+                    }
                     $aux_site[self::JUST_METAS] = true;
                     $aux_sites[] = $aux_site;
                     if (!empty($aux_site[self::DESCRIPTION])) {
diff --git a/src/views/StaticView.php b/src/views/StaticView.php
index 9e8b78d49..4f57c8e7b 100644
--- a/src/views/StaticView.php
+++ b/src/views/StaticView.php
@@ -91,8 +91,8 @@ class StaticView extends View
             in_array($data["AD_LOCATION"], ['side', 'both'] ) ) { ?>
             <div class="side-adscript"><?= $data['SIDE_ADSCRIPT'] ?></div><?php
         }
-        if (isset($data["value"]) && isset($data['page']) &&
-            isset($this->page_objects[$data['page']])) {
+        if (isset($data["value"]) && !empty($data['page']) &&
+            !empty($this->page_objects[$data['page']])) {
             e(sprintf($this->page_objects[$data['page']],
                 $data["value"]));
         } else {
ViewGit