Skip to content

Commit 83d69ff

Browse files
committed
refactor: remove version check version_compare(PHP_VERSION, '8.0.0', '>=')
1 parent 2840022 commit 83d69ff

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

system/Autoloader/Autoloader.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,7 @@ public function sanitizeFilename(string $filename): string
343343
);
344344
}
345345
if ($result === false) {
346-
if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
347-
$message = preg_last_error_msg();
348-
} else {
349-
$message = 'Regex error. error code: ' . preg_last_error();
350-
}
346+
$message = preg_last_error_msg();
351347

352348
throw new RuntimeException($message . '. filename: "' . $filename . '"');
353349
}

0 commit comments

Comments
 (0)