Skip to content

Commit

Permalink
Fix restore condition on upload rebuild (#8049)
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais authored Sep 13, 2024
1 parent 3696f75 commit ca01be1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/ILIAS/Form/classes/class.ilPropertyFormGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ protected function rebuildUploadedFiles(): void
$name = $file[7];

if ($idx2 != "") {
if (!isset($_FILES[$field]["tmp_name"][$idx]) || !$_FILES[$field]["tmp_name"][$idx][$idx2]) {
if (!isset($_FILES[$field]["tmp_name"][$idx][$idx2])) {
$_FILES[$field]["tmp_name"][$idx][$idx2] = $full_file;
$_FILES[$field]["name"][$idx][$idx2] = $name;
$_FILES[$field]["type"][$idx][$idx2] = $type;
Expand All @@ -1040,7 +1040,7 @@ protected function rebuildUploadedFiles(): void
$_FILES[$field]["is_upload"][$idx][$idx2] = false;
}
} elseif ($idx != "") {
if (!isset($_FILES[$field]["tmp_name"][$idx]) || $_FILES[$field]["tmp_name"][$idx]) {
if (!isset($_FILES[$field]["tmp_name"][$idx])) {
$_FILES[$field]["tmp_name"][$idx] = $full_file;
$_FILES[$field]["name"][$idx] = $name;
$_FILES[$field]["type"][$idx] = $type;
Expand All @@ -1049,7 +1049,7 @@ protected function rebuildUploadedFiles(): void
$_FILES[$field]["is_upload"][$idx] = false;
}
} else {
if (!$_FILES[$field]["tmp_name"]) {
if (!isset($_FILES[$field]["tmp_name"])) {
$_FILES[$field]["tmp_name"] = $full_file;
$_FILES[$field]["name"] = $name;
$_FILES[$field]["type"] = $type;
Expand Down

0 comments on commit ca01be1

Please sign in to comment.