use PHP 8 str_starts_with function

This commit is contained in:
yggverse 2024-03-21 18:47:11 +02:00
parent 79b82d46e1
commit 5e4494c9e8
2 changed files with 3 additions and 3 deletions

View file

@ -575,7 +575,7 @@ foreach($index->search('')
);
/// absolute
if ('/' === substr($config->snap->storage->tmp->directory, 0, 1))
if (str_starts_with($config->snap->storage->tmp->directory, '/'))
{
$filepath = $config->snap->storage->tmp->directory;
}
@ -671,7 +671,7 @@ foreach($index->search('')
if ($allowed)
{
/// absolute
if ('/' === substr($config->snap->storage->local->directory, 0, 1))
if (str_starts_with($config->snap->storage->local->directory, '/'))
{
$filepath = $config->snap->storage->local->directory;
}