FIX: fix enumerations - empty init caused error

This commit is contained in:
Michal Kváček
2016-01-27 15:27:15 +01:00
parent c4dd6cc229
commit 686ce63ca7
+5
View File
@@ -26,6 +26,11 @@ abstract class BaseEnumeration
$className::init();
}
// it can happen that even after init no enumerations are available
if (empty(self::$items[$className])) {
self::$items[$className] = [];
}
self::$initiliazed[] = $className;
}
}