Skip to content

Commit 878a8e4

Browse files
authored
fix store() default value bug
fix store() default value creation'index. html'file path error,like '20190810index.html'
1 parent 1ed8d36 commit 878a8e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/HTTP/Files/UploadedFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,12 @@ public function isValid(): bool
400400
*/
401401
public function store(string $folderName = null, string $fileName = null): string
402402
{
403-
$folderName = $folderName ?? date('Ymd');
403+
$folderName = $folderName ?? date('Ymd') . DIRECTORY_SEPARATOR;
404404
$fileName = $fileName ?? $this->getRandomName();
405405

406406
// Move the uploaded file to a new location.
407407
return ($this->move(WRITEPATH . 'uploads/' . $folderName, $fileName)) ?
408-
$folderName . DIRECTORY_SEPARATOR . $this->name : null;
408+
$folderName . $this->name : null;
409409
}
410410

411411
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)