Explorar el Código

fixed schema factory cache

Piotr Labudda hace 8 años
padre
commit
c44d11edfb
Se han modificado 1 ficheros con 1 adiciones y 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();