1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2024-01-03 12:20:42 -05:00
parent 3220b7dc40
commit ee217ee3bd

View File

@@ -1224,7 +1224,7 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
$pagefile = $this->processInputAddFile($filename);
if($pagefile && isset($originalFilenames[$filename]) && $originalFilenames[$filename] != $filename) {
$pagefile->filedata('uploadName', $originalFilenames[$filename]);
} else if($pagefile->filedata('uploadName')) {
} else if($pagefile && $pagefile->filedata('uploadName')) {
$pagefile->filedata('uploadName', ''); // clear out previous
}
$changed = true;