mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +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
|
@ -198,7 +198,7 @@ class SelectAPIController extends AbstractController
|
|||
//Remove the data-* prefix for each key
|
||||
$data = array_combine(
|
||||
array_map(static function ($key) {
|
||||
if (strpos($key, 'data-') === 0) {
|
||||
if (str_starts_with($key, 'data-')) {
|
||||
return substr($key, 5);
|
||||
}
|
||||
return $key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue