From ed39e47c9d37850bff11661e978564e8aeb9a727 Mon Sep 17 00:00:00 2001 From: VicDeo Date: Tue, 19 Mar 2013 16:40:52 +0300 Subject: [PATCH] Remove leading and trailing backslashes in classname. Ref #2310 --- lib/base.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base.php b/lib/base.php index 0d33dbb163e..c921c45f4a1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -78,6 +78,8 @@ class OC { * SPL autoload */ public static function autoload($className) { + $className = trim ($className, '\\'); + if (array_key_exists($className, OC::$CLASSPATH)) { $path = OC::$CLASSPATH[$className]; /** @TODO: Remove this when necessary -- 2.39.5