Remove leading and trailing backslashes in classname. Ref #2310

This commit is contained in:
VicDeo 2013-03-19 16:40:52 +03:00
parent e8100dc1a8
commit c3a64012d8
1 changed files with 2 additions and 0 deletions

View 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