diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index ad4de0329d66..f8b678a5e0c7 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -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 . '"'); }