viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Attempt to reduce query retrieval time by sending less data in raw=1 case take 3, a=chris

Chris Pollett [2019-07-11 18:Jul:th]
Attempt to reduce query retrieval time by sending less data in raw=1 case take 3, a=chris
Filename
src/models/PhraseModel.php
diff --git a/src/models/PhraseModel.php b/src/models/PhraseModel.php
index 2c0c19eaf..1f668dc1a 100755
--- a/src/models/PhraseModel.php
+++ b/src/models/PhraseModel.php
@@ -1263,10 +1263,12 @@ class PhraseModel extends ParallelModel
                     self::DOC_RANK => number_format($p[self::DOC_RANK], 4),
                     self::RELEVANCE => number_format($p[self::RELEVANCE], 4),
                     self::PROXIMITY => number_format($p[self::PROXIMITY],4),
-                    self::MACHINE_ID => $p[self::MACHINE_ID],
                     self::KEY => $p[self::KEY],
                     self::CRAWL_TIME => $p[self::CRAWL_TIME],
                     self::SUMMARY_OFFSET => $p[self::SUMMARY_OFFSET] ];
+                if (isset($p[self::MACHINE_ID])) {
+                    $result_page[self::MACHINE_ID] = $p[self::MACHINE_ID];
+                }
                 $result_pages[] = $result_page;
             }
             $results['PAGES'] = & $result_pages;
ViewGit