From 67067db739d290c1c35a8fceddba6179926fae16 Mon Sep 17 00:00:00 2001 From: zmmfly Date: Wed, 10 Jul 2019 04:12:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPHP7.3=E4=B8=8Bfilter=5Fvar?= =?UTF-8?q?=E5=BA=9F=E5=BC=83FILTER=5FFLAG=5FHOST=5FREQUIRED=E9=80=A0?= =?UTF-8?q?=E6=88=90=E7=9A=84=E9=94=99=E8=AF=AF=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AD=97=E6=AE=B5=E9=94=99=E8=AF=AF=E9=80=A0?= =?UTF-8?q?=E6=88=90=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=B9=E5=88=9B=E5=BB=BA?= =?UTF-8?q?500=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/model/FileManage.php | 2 +- extend/PHPMailer/PHPMailer/PHPMailer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/index/model/FileManage.php b/application/index/model/FileManage.php index e452c845..05034343 100644 --- a/application/index/model/FileManage.php +++ b/application/index/model/FileManage.php @@ -752,7 +752,7 @@ class FileManage extends Model{ if(empty($dirName)){ return ["result"=>["success"=>false,"error"=>"目录名不能为空"]]; } - if(Db::name('folders')->where('position_absolute',$dirPosition)->where('owner',$uid)->find() ==null || Db::name('folders')->where('owner',$uid)->where('position',$dirPosition)->where('folder_name',$dirName)->find() !=null || Db::name('files')->where('upload_date',$uid)->where('dir',$dirPosition)->where('pre_name',$dirName)->find() !=null){ + if(Db::name('folders')->where('position_absolute',$dirPosition)->where('owner',$uid)->find() ==null || Db::name('folders')->where('owner',$uid)->where('position',$dirPosition)->where('folder_name',$dirName)->find() !=null || Db::name('files')->where('upload_user',$uid)->where('dir',$dirPosition)->where('pre_name',$dirName)->find() !=null){ return ["result"=>["success"=>false,"error"=>"路径不存在或文件已存在"]]; } $sqlData = [ diff --git a/extend/PHPMailer/PHPMailer/PHPMailer.php b/extend/PHPMailer/PHPMailer/PHPMailer.php index 44926151..3483ad6c 100644 --- a/extend/PHPMailer/PHPMailer/PHPMailer.php +++ b/extend/PHPMailer/PHPMailer/PHPMailer.php @@ -3594,7 +3594,7 @@ class PHPMailer //Is it a valid IPv4 address? return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } - if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) { + if (filter_var('http://' . $host, FILTER_VALIDATE_URL)) { //Is it a syntactically valid hostname? return true; }