Replaced strpos() with simplified realization (#1172)

This commit is contained in:
Roman Kelesidis 2023-11-27 20:12:13 +03:00 committed by GitHub
commit 493cd910cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 24 additions and 24 deletions

View file

@ -41,7 +41,7 @@ switch ($mode) {
$dir = $template->cachedir;
$res = @opendir($dir);
while (($file = readdir($res)) !== false) {
if (0 === strpos($file, $match)) {
if (str_starts_with($file, $match)) {
@unlink($dir . $file);
}
}