From b585b16d31175e4421cca29662768c8fbebd8840 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 5 Jun 2023 21:02:18 +0300 Subject: [PATCH] fix datatype error detection --- crontab/crawler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crontab/crawler.php b/crontab/crawler.php index bceec9c..31b77f4 100644 --- a/crontab/crawler.php +++ b/crontab/crawler.php @@ -944,7 +944,8 @@ try { // Ban page that throws the data type error and stuck the crawl queue if (!empty($queueHostPage->hostPageId) && - !empty($e->getCode()) && in_array($e->getCode(), [1366])) { // @TODO + !empty($e->errorInfo[0]) && in_array($e->errorInfo[0], ['HY000']) && + !empty($e->errorInfo[1]) && in_array($e->errorInfo[1], [1366])) { // @TODO $hostPagesBanned = $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());