DirectorObjectForm: getSentOrObjectValue should...

...not fail on missing elements
This commit is contained in:
Thomas Gelf 2016-06-16 14:17:40 +02:00
parent 6254a0de3a
commit 144b20afc8
1 changed files with 1 additions and 3 deletions

View File

@ -379,8 +379,6 @@ abstract class DirectorObjectForm extends QuickForm
$this->addField($field, $value, $inheritedValue, $inheritFrom); $this->addField($field, $value, $inheritedValue, $inheritFrom);
} }
foreach ($checkFields as $field) { foreach ($checkFields as $field) {
$varname = $field->varname; $varname = $field->varname;
if (property_exists($vars, $varname)) { if (property_exists($vars, $varname)) {
@ -968,7 +966,7 @@ abstract class DirectorObjectForm extends QuickForm
return $objectProperty; return $objectProperty;
} }
if (!$this->valueIsEmpty($val = $this->getElement($name)->getValue())) { if ($el = $this->getElement($name) && !$this->valueIsEmpty($val = $el->getValue())) {
return $val; return $val;
} }