diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-03-21 00:46:09 -0700 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-03-21 00:46:09 -0700 |
commit | ad2d222466b6b7a604d3c7afdcebc89fee3481c8 (patch) | |
tree | b7b5b211d2ded2e8e32df73cc0134dc4f25ba7aa /lib | |
parent | 3b1c7de459bc0b95d68acfca3d79c47b4145a360 (diff) | |
parent | 3e9ea6d13b33cb23274d688f6375e7856ec16e2c (diff) | |
download | nextcloud-server-ad2d222466b6b7a604d3c7afdcebc89fee3481c8.tar.gz nextcloud-server-ad2d222466b6b7a604d3c7afdcebc89fee3481c8.zip |
Merge pull request #2447 from owncloud/fix_namespace_in_autoloader
Remove leading and trailing backslashes in classname. Ref #2310
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 0d33dbb163e..76ad0654ed0 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 |