修复PHP7.3下filter_var废弃FILTER_FLAG_HOST_REQUIRED造成的错误

修复查询字段错误造成的文件夹创建500错误
pull/175/head
zmmfly 6 years ago
parent 5e369a9bc1
commit 67067db739

@ -752,7 +752,7 @@ class FileManage extends Model{
if(empty($dirName)){ if(empty($dirName)){
return ["result"=>["success"=>false,"error"=>"目录名不能为空"]]; 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"=>"路径不存在或文件已存在"]]; return ["result"=>["success"=>false,"error"=>"路径不存在或文件已存在"]];
} }
$sqlData = [ $sqlData = [

@ -3594,7 +3594,7 @@ class PHPMailer
//Is it a valid IPv4 address? //Is it a valid IPv4 address?
return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); 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? //Is it a syntactically valid hostname?
return true; return true;
} }

Loading…
Cancel
Save