3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 21:15:41 +00:00

Fixed RB-3997

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-07-21 13:48:01 +01:00
parent 6537f3794b
commit 988000952e

View File

@ -80,9 +80,20 @@ class UploadFileRequest extends Request
{
$attributes = [];
if ($this->file) {
if (($this->file) && (is_array($this->file))) {
for ($i = 0; $i < count($this->file); $i++) {
$attributes['file.'.$i] = $this->file[$i]->getClientOriginalName();
try {
if ($this->file[$i]) {
$attributes['file.'.$i] = $this->file[$i]->getClientOriginalName();
}
} catch (\Exception $e) {
$attributes['file.'.$i] = 'Invalid file';
}
}
}