Skip to content

Commit 536e327

Browse files
committed
fix: remove the code to return null
$this->move() never returns false, but throws exception
1 parent 49520c7 commit 536e327

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

system/HTTP/Files/UploadedFile.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,9 @@ public function store(string $folderName = null, string $fileName = null): strin
376376
$fileName = $fileName ?? $this->getRandomName();
377377

378378
// Move the uploaded file to a new location.
379-
return ($this->move(WRITEPATH . 'uploads/' . $folderName, $fileName)) ?
380-
$folderName . $this->name : null;
379+
$this->move(WRITEPATH . 'uploads/' . $folderName, $fileName);
380+
381+
return $folderName . $this->name;
381382
}
382383

383384
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)