Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes for getting the file name in the cases when the file name key i…
…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
commit fe796862554385936c346caec19c1d218de2a73f
6 changes: 5 additions & 1 deletion lib/private/Files/FileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,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