From 1609cde8b8c6aee1a1d0cb2b70c50b20ce90e3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Sat, 9 Sep 2023 21:30:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=94=E3=82=81=E3=82=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.example.php | 2 +- www/index.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.example.php b/config.example.php index 97160ee..5f462d1 100644 --- a/config.example.php +++ b/config.example.php @@ -1,4 +1,4 @@ diff --git a/www/index.php b/www/index.php index 9bcc8a3..c34b1be 100644 --- a/www/index.php +++ b/www/index.php @@ -9,6 +9,7 @@ function getimg (string $str): string { preg_match('//', $str, $matches); + if (!isset($matches[1])) return ""; $res = str_replace("https://", IMGPROXY."/", $matches[1]); unset($matches); return $res; @@ -79,6 +80,7 @@ $res = preg_replace('/(.*?)<\/table>/s', "", $res); $res = preg_replace('/
(.*?)<\/div>/s', "", $res); $res = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $res); $res = str_replace("", "", $res);