mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 20:50:06 +02:00
Use str_contains and similar instead of strpos
This commit is contained in:
parent
508de10191
commit
1dbf36b86b
16 changed files with 18 additions and 19 deletions
|
@ -78,7 +78,7 @@ class AttachmentURLGenerator
|
|||
}
|
||||
|
||||
//Our absolute path must begin with public path, or we can not use it for asset pathes.
|
||||
if (0 !== strpos($absolute_path, $public_path)) {
|
||||
if (!str_starts_with($absolute_path, $public_path)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue