Explorar o código

fixed schema factory cache

Piotr Labudda %!s(int64=8) %!d(string=hai) anos
pai
achega
c44d11edfb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      SE/se-lib/SchemaFactory.php

+ 1 - 1
SE/se-lib/SchemaFactory.php

@@ -5,7 +5,7 @@ class SchemaFactory {
 	public static function loadDefaultObject($namespace) {
 		static $_cache = [];
 		$clsName = str_replace('/', '_', $namespace);
-		if (array_key_exists($name, $_cache)) return $_cache[$clsName];
+		if (array_key_exists($clsName, $_cache)) return $_cache[$clsName];
 		$objClassName = "Schema_{$clsName}StorageAcl";
 		if (!Lib::tryLoadClass($objClassName)) throw new HttpException("Not implemented - storage object not found '{$namespace}'", 501);
 		$_cache[$clsName] = new $objClassName();