From 8ce0324e94cae0078419b8851b440db31b521f2a Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 May 2023 12:52:07 +0300 Subject: [PATCH] convert page data to string --- crontab/crawler.php | 2 +- library/filter.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crontab/crawler.php b/crontab/crawler.php index 7970c56..fea424b 100644 --- a/crontab/crawler.php +++ b/crontab/crawler.php @@ -475,7 +475,7 @@ try { Filter::pageTitle($title->item(0)->nodeValue), Filter::pageDescription($metaDescription), Filter::pageKeywords($metaKeywords), - $queueHostPage->crawlMetaOnly ? null : $content, + $queueHostPage->crawlMetaOnly ? null : Filter::string($content), time()); // Update manifest registry diff --git a/library/filter.php b/library/filter.php index c149c63..1570de3 100644 --- a/library/filter.php +++ b/library/filter.php @@ -2,6 +2,11 @@ class Filter { + static public function string(mixed $data) { + + return (string) $data; + } + static public function url(mixed $url) { $url = (string) $url;