Remove leading and trailing backslashes in classname. Ref #2310
This commit is contained in:
parent
e8100dc1a8
commit
c3a64012d8
|
@ -78,6 +78,8 @@ class OC {
|
||||||
* SPL autoload
|
* SPL autoload
|
||||||
*/
|
*/
|
||||||
public static function autoload($className) {
|
public static function autoload($className) {
|
||||||
|
$className = trim ($className, '\\');
|
||||||
|
|
||||||
if (array_key_exists($className, OC::$CLASSPATH)) {
|
if (array_key_exists($className, OC::$CLASSPATH)) {
|
||||||
$path = OC::$CLASSPATH[$className];
|
$path = OC::$CLASSPATH[$className];
|
||||||
/** @TODO: Remove this when necessary
|
/** @TODO: Remove this when necessary
|
||||||
|
|
Loading…
Reference in New Issue