Skip to content

Commit

Permalink
Fixes for getting the file name in the cases when the file name key i…
Browse files Browse the repository at this point in the history
…s received, but it is empty

Signed-off-by: hopleus <hopleus@gmail.com>
  • Loading branch information
hopleus authored and backportbot[bot] committed Mar 14, 2024
1 parent 0a4b328 commit 591c2cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/FileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ public function getMimePart() {
* @return string
*/
public function getName() {
return isset($this->data['name']) ? $this->data['name'] : basename($this->getPath());
if (isset($this->data['name']) && !empty($this->data['name'])) {
return $this->data['name'];
}

return basename($this->getPath());
}

/**
Expand Down

0 comments on commit 591c2cb

Please sign in to comment.