viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
diff --git a/src/controllers/CrawlController.php b/src/controllers/CrawlController.php index 91d5e735c..ba9cc7d3b 100644 --- a/src/controllers/CrawlController.php +++ b/src/controllers/CrawlController.php @@ -241,6 +241,10 @@ class CrawlController extends Controller implements CrawlConstants unserialize(L\webdecode($_REQUEST["arg"])); $our_lookups = []; foreach ($lookups as $lookup => $lookup_info) { + if (!is_array($lookup_info) || empty($lookup_info)) { + $our_lookups[$lookup] = []; + continue; + } if (count($lookup_info) == 2 && ($lookup_info[0][0] === 'h' || $lookup_info[0][0] === 'r' || $lookup_info[0][0] === 'g')) { diff --git a/src/models/Model.php b/src/models/Model.php index 5b8a10d0c..89a2424b7 100755 --- a/src/models/Model.php +++ b/src/models/Model.php @@ -275,7 +275,7 @@ class Model implements CrawlConstants } else { $page[self::DESCRIPTION] = mb_substr($page[self::DESCRIPTION], 0, $description_length); - $test_snippet = preg_replace('/[^\s]+$/', "", + $test_snippet = preg_replace('/[^\s]+$/u', "", $page[self::DESCRIPTION]); if(!empty($test_snippet)) { $page[self::DESCRIPTION] = $test_snippet;