Skip to content

Commit

Permalink
refactor: remove version check `version_compare(PHP_VERSION, '8.0.0',…
Browse files Browse the repository at this point in the history
… '>=')`
  • Loading branch information
kenjis committed Nov 29, 2022
1 parent 7142f27 commit 2e9b5cb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions system/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,7 @@ public function sanitizeFilename(string $filename): string
);
}
if ($result === false) {
if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
$message = preg_last_error_msg();
} else {
$message = 'Regex error. error code: ' . preg_last_error();
}
$message = preg_last_error_msg();

throw new RuntimeException($message . '. filename: "' . $filename . '"');
}
Expand Down

0 comments on commit 2e9b5cb

Please sign in to comment.