From d87c3cdc20d808f0d4ee5cb0402319b1da46187b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <93301500+xushubieli@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:50:37 +0800 Subject: [PATCH] Update common.func.php --- src/system/common.func.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/system/common.func.php b/src/system/common.func.php index 6e60ffa7..9d8627cb 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -65,7 +65,11 @@ if (version_compare(PHP_VERSION, '7.0.0', '>=')) { if (!function_exists('mysql_close') and function_exists('mysqli_close')) { function mysql_close($link) { - return mysqli_close($link); + if ($link) { + return @mysqli_close($link); + } else { + return false; + } } } if (!function_exists('mysql_free_result') and function_exists('mysqli_free_result')) {