DirectorObjectForm: safety checks for non-imports

This commit is contained in:
Thomas Gelf 2016-03-06 09:11:29 +01:00
parent 70db23b8d1
commit e0d00c3ae0
1 changed files with 8 additions and 3 deletions

View File

@ -170,8 +170,13 @@ abstract class DirectorObjectForm extends QuickForm
return $this;
}
$inherited = $object->getInheritedProperties();
$origins = $object->getOriginsProperties();
if ($object->supportsImports()) {
$inherited = $object->getInheritedProperties();
$origins = $object->getOriginsProperties();
} else {
$inherited = (object) array();
$origins = (object) array();
}
foreach ($props as $k => $v) {
if ($k !== 'object_name' && property_exists($inherited, $k)) {
@ -747,7 +752,7 @@ abstract class DirectorObjectForm extends QuickForm
$object = $this->getObject();
if ($object->hasProperty($name)) {
if ($resolved) {
if ($resolved && $object->supportsImports()) {
$objectProperty = $object->getResolvedProperty($name);
/*
var_dump($name);