viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
diff --git a/src/controllers/components/CrawlComponent.php b/src/controllers/components/CrawlComponent.php index 46496e5da..6420b996a 100644 --- a/src/controllers/components/CrawlComponent.php +++ b/src/controllers/components/CrawlComponent.php @@ -1494,6 +1494,10 @@ class CrawlComponent extends Component implements CrawlConstants $site_pages = FetchUrl::getPages($sites, true, $data["PAGE_RANGE_REQUEST"], C\CRAWL_DIR . "/temp"); $site = $site_pages[0]; + if (!empty($site[self::HTTP_CODE]) && empty($site[self::TYPE]) && + $site[self::HTTP_CODE] >=300 && $site[self::HTTP_CODE] <= 400) { + $site[self::TYPE] = "text/plain"; + } $data['TESTPAGE'] = (empty($site[self::PAGE])) ? "" : $site[self::PAGE]; }