Removed some bugs in abstract class, added testcase

This commit is contained in:
2019-05-22 15:26:24 +02:00
parent b3e28d7884
commit b868f0fe86
5 changed files with 103 additions and 8 deletions

View File

@@ -127,7 +127,7 @@ abstract class AbstractCommonClubsModel
{
foreach($this->getFactory()->getAttributes() as $k => $v)
{
if($v['type'] !== 'ref')
if(empty($v['type']) || $v['type'] !== 'ref')
continue;
if(empty($v['ref']))
@@ -148,7 +148,7 @@ abstract class AbstractCommonClubsModel
return $factory->loadById($value);
}
private static const CLASSNAME_MAP = array(
private const CLASSNAME_MAP = array(
);