Fixed exception when try to create a new part.

This commit is contained in:
Jan Böhmer 2019-10-06 15:49:42 +02:00
parent 4c7767feed
commit ac3e5d2669

View file

@ -134,10 +134,12 @@ class ElementPermissionListener
//If the user is not allowed to edit or read this property, reset all values. //If the user is not allowed to edit or read this property, reset all values.
if ((!$this->security->isGranted($annotation->getEditOperationName(), $element) if ((!$this->security->isGranted($annotation->getEditOperationName(), $element)
|| !$this->security->isGranted($annotation->getReadOperationName(), $element))) { || !$this->security->isGranted($annotation->getReadOperationName(), $element))) {
//Set value to old value, so that there a no change to this property //Set value to old value, so that there a no change to this property
$property->setValue($element, $old_data[$property->getName()]); if (isset($old_data[$property->getName()])) {
$changed = true; $property->setValue($element, $old_data[$property->getName()]);
$changed = true;
}
} }