Merge pull request #431 from peter17/3.0
Fix error on Form/Type/ModelType.php.
This commit is contained in:
commit
c605b9346f
|
@ -178,7 +178,10 @@ class ModelType extends AbstractType
|
||||||
$firstIdentifier = current($identifier);
|
$firstIdentifier = current($identifier);
|
||||||
if (count($identifier) === 1 && in_array($firstIdentifier->getPdoType(), [\PDO::PARAM_BOOL, \PDO::PARAM_INT, \PDO::PARAM_STR])) {
|
if (count($identifier) === 1 && in_array($firstIdentifier->getPdoType(), [\PDO::PARAM_BOOL, \PDO::PARAM_INT, \PDO::PARAM_STR])) {
|
||||||
return function($object) use ($firstIdentifier) {
|
return function($object) use ($firstIdentifier) {
|
||||||
|
if ($object) {
|
||||||
return call_user_func([$object, 'get' . ucfirst($firstIdentifier->getPhpName())]);
|
return call_user_func([$object, 'get' . ucfirst($firstIdentifier->getPhpName())]);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue