From a2d8bef4cb5a8c13ec5c328af6b41a76c62ccdd0 Mon Sep 17 00:00:00 2001 From: yumo Date: Wed, 5 Apr 2023 20:38:11 +0800 Subject: [PATCH 1/3] fix php8.1 request 500 --- server/app/common/lists/BaseDataLists.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/app/common/lists/BaseDataLists.php b/server/app/common/lists/BaseDataLists.php index bebf81c2e..ce7839f95 100644 --- a/server/app/common/lists/BaseDataLists.php +++ b/server/app/common/lists/BaseDataLists.php @@ -120,10 +120,13 @@ abstract class BaseDataLists implements ListsInterface return []; } $startTime = $this->request->get('start_time'); - $this->startTime = strtotime($startTime); + if ($startTime){ + $this->startTime = strtotime($startTime); + } $endTime = $this->request->get('end_time'); - $this->endTime = strtotime($endTime); - + if($endTime){ + $this->endTime = strtotime($endTime); + } $this->start = $this->request->get('start'); $this->end = $this->request->get('end'); -- Gitee From 1d3f74ccc99691892af0d08aa8bc36c2a06d684d Mon Sep 17 00:00:00 2001 From: yumo Date: Wed, 5 Apr 2023 20:57:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix=20php8.1=E6=94=BF=E7=AD=96=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E4=B8=BA=E7=A9=BA=E6=8E=A5=E5=8F=A3=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/common.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/app/common.php b/server/app/common.php index deb4deb08..e281e18eb 100644 --- a/server/app/common.php +++ b/server/app/common.php @@ -208,6 +208,9 @@ function clear_file_domain($content) */ function get_file_domain($content) { + if (empty($content)){ + return $content; + }server/app/common.php $preg = '/()/is'; $fileUrl = FileService::getFileUrl(); return preg_replace($preg, "\${1}$fileUrl\${2}\${3}", $content); -- Gitee From 5249559dac8447b55180f69043d50885ffa37935 Mon Sep 17 00:00:00 2001 From: yumo Date: Wed, 5 Apr 2023 20:59:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix=20php8.1=E6=94=BF=E7=AD=96=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E4=B8=BA=E7=A9=BA=E6=8E=A5=E5=8F=A3=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/common.php b/server/app/common.php index e281e18eb..37c71bf19 100644 --- a/server/app/common.php +++ b/server/app/common.php @@ -210,7 +210,7 @@ function get_file_domain($content) { if (empty($content)){ return $content; - }server/app/common.php + } $preg = '/()/is'; $fileUrl = FileService::getFileUrl(); return preg_replace($preg, "\${1}$fileUrl\${2}\${3}", $content); -- Gitee