top-think / think

ThinkPHP Framework ——十年匠心的高性能PHP框架
http://www.thinkphp.cn
Other
7.83k stars 1.62k forks source link

think\file\UploadedFile::move方法有bug,代码行数:65,69 #1034

Closed twomiao closed 4 years ago

twomiao commented 4 years ago

复现代码:

$file = request()->file('photo');
$file->move( app()->getRootPath() . 'public/photo', 'ipx.jpg');

报错信息:

框架错误代码:

  1. $target = $this->getTargetFile($directory, $name); # 该方法得到 File 实例
  2. $moved = move_uploaded_file($this->getPathname(), $target); # 错误代码
  3. @chmod($target, 0666 & ~umask()); # 错误代码
liu21st commented 4 years ago

这个地方已经修正过的哦