Fix trim command on interface name (#7336)

This commit is contained in:
frytimo 2025-03-26 16:11:37 -03:00 committed by GitHub
parent 288f693c12
commit c165afc53e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

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