]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove leading and trailing backslashes in classname. Ref #2310
authorVicDeo <victor.dubiniuk@gmail.com>
Tue, 19 Mar 2013 13:40:52 +0000 (16:40 +0300)
committerVicDeo <victor.dubiniuk@gmail.com>
Sun, 31 Mar 2013 12:49:43 +0000 (16:49 +0400)
lib/base.php

index 0d33dbb163e5cdef5e14a557015fe0cd7662e2af..c921c45f4a1f09b18810395e8bd5f5773e7d2cb5 100644 (file)
@@ -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