From c165afc53eff2e9b3cc1e4be628594244c2d61d4 Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 26 Mar 2025 16:11:37 -0300 Subject: [PATCH] Fix trim command on interface name (#7336) --- resources/classes/auto_loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/classes/auto_loader.php b/resources/classes/auto_loader.php index 7c2899c21d..398371fed4 100644 --- a/resources/classes/auto_loader.php +++ b/resources/classes/auto_loader.php @@ -296,7 +296,7 @@ class auto_loader { $type = $match[1]; // The class/interface/trait name - $name = trim($match[2], "\n\r\t\v\x00\\"); + $name = trim($match[2]); // 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, "\n\r\t\v\x00\\"); + $interface_name = trim($interface); // Check that it is declared as an array so we can record the classes if (empty($this->interfaces[$interface_name])) $this->interfaces[$interface_name] = [];