Add backslash to the trim command

This commit is contained in:
Tim Fry 2025-03-26 17:22:00 -03:00
parent c165afc53e
commit a095b448a5
1 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ class auto_loader {
$type = $match[1];
// The class/interface/trait name
$name = trim($match[2]);
$name = trim($match[2], " \n\r\t\v\x00\\");
// Combine the namespace and name
$full_name = $namespace . $name;
@ -309,7 +309,7 @@ class auto_loader {
// Split the interface list by commas.
$interface_list = explode(',', $match[3]);
foreach ($interface_list as $interface) {
$interface_name = trim($interface);
$interface_name = trim($interface, " \n\r\t\v\x00\\");
// Check that it is declared as an array so we can record the classes
if (empty($this->interfaces[$interface_name]))
$this->interfaces[$interface_name] = [];