framework
framework copied to clipboard
request()->file('file2') SplFileObject exception when file('file1') moved on linux
Only in linux(centos 7), crash report php 7.2.30
SplFileObject::__construct(/tmp/phpLnXyN7): failed to open stream: No such file or directory
public function test(){
print_r([
request()->file('file1')->move('./uploads/test/'),
request()->file('file2'), //crash
]);
}
exception on thinkphp 5.1/5.2/6.0
because file('xxx') function call to dealUploadFile(), this function create all file object, but the $_FILES was invalid(file moved)...
$array = $this->dealUploadFile($files, $name); // all files object, but $_FILES was invalid!!!
same #1436 #1603