From c3a64012d83b424421555b642c2bd8c59bde82c1 Mon Sep 17 00:00:00 2001
From: VicDeo <victor.dubiniuk@gmail.com>
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 0d33dbb163..c921c45f4a 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
-- 
GitLab