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

Add a check to ScraperManager so doesn't through error if no Delete XPaths, a=chris

Chris Pollett [2019-12-02 02:Dec:nd]
Add a check to ScraperManager so doesn't through error if no Delete XPaths, a=chris
Filename
src/library/ScraperManager.php
diff --git a/src/library/ScraperManager.php b/src/library/ScraperManager.php
index 57f7abf70..fc12e92cf 100644
--- a/src/library/ScraperManager.php
+++ b/src/library/ScraperManager.php
@@ -201,6 +201,9 @@ class ScraperManager
      */
     public static function removeContentByXquery($dom, $query)
     {
+        if (empty($dom) || empty($query)) {
+            return;
+        }
         $xpath = new \DOMXPath($dom);
         $xpath_result = $xpath->query($query);
         if ($xpath_result->length > 0) {
ViewGit