mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-10 21:19:30 +00:00
Merge branch 'master' into settings-bundle
This commit is contained in:
commit
3e657a7cac
305 changed files with 7543 additions and 4274 deletions
|
|
@ -302,7 +302,7 @@ class AttachmentSubmitHandler
|
|||
return $attachment;
|
||||
}
|
||||
|
||||
$filename = basename($old_path);
|
||||
$filename = basename((string) $old_path);
|
||||
//If the basename is not one of the new unique on, we have to save the old filename
|
||||
if (!preg_match('#\w+-\w{13}\.#', $filename)) {
|
||||
//Save filename to attachment field
|
||||
|
|
@ -380,7 +380,7 @@ class AttachmentSubmitHandler
|
|||
|
||||
//If we don't know filename yet, try to determine it out of url
|
||||
if ('' === $filename) {
|
||||
$filename = basename(parse_url($url, PHP_URL_PATH));
|
||||
$filename = basename(parse_url((string) $url, PHP_URL_PATH));
|
||||
}
|
||||
|
||||
//Set original file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue