From: VicDeo Date: Tue, 19 Mar 2013 13:40:52 +0000 (+0300) Subject: Remove leading and trailing backslashes in classname. Ref #2310 X-Git-Tag: v6.0.0alpha2~1027^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c3a64012d83b424421555b642c2bd8c59bde82c1;p=nextcloud-server.git Remove leading and trailing backslashes in classname. Ref #2310 --- 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