mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 03:14:32 +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
|
@ -79,7 +79,7 @@ final class BarcodeGenerator
|
|||
$repr = 'data:';
|
||||
|
||||
$repr .= $mime;
|
||||
if (0 === strpos($mime, 'text/')) {
|
||||
if (str_starts_with($mime, 'text/')) {
|
||||
$repr .= ','.rawurlencode($data);
|
||||
} else {
|
||||
$repr .= ';base64,'.base64_encode($data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue