Allow backslashes to fix namespaces in autoloader (#7766)

This commit is contained in:
Alex
2026-02-27 15:35:58 -07:00
committed by GitHub
parent 6d5c7f0cd5
commit a0b0c3871f

View File

@@ -367,7 +367,7 @@ class auto_loader {
private function loader($class_name): bool {
//sanitize the class name
$class_name = preg_replace('/[^a-zA-Z0-9_]/', '', $class_name);
$class_name = preg_replace('/[^a-zA-Z0-9_\\\\]/', '', $class_name);
//find the path using the class_name as the key in the classes array
if (isset($this->classes[$class_name])) {