DbObjectWithSettings: also call setter if just...

...a setter and no getter exists
This commit is contained in:
Thomas Gelf 2019-09-19 23:27:53 +02:00
parent 10be27c9a3
commit a93d743e8c
1 changed files with 3 additions and 1 deletions

View File

@ -19,9 +19,11 @@ abstract class DbObjectWithSettings extends DbObject
{
if ($this->hasProperty($key)) {
return parent::set($key, $value);
} elseif ($this->hasSetterForProperty($key)) { // Hint: hasProperty checks only for Getters
return parent::set($key, $value);
}
if (! array_key_exists($key, $this->settings) || $value !== $this->settings[$key]) {
if (! \array_key_exists($key, $this->settings) || $value !== $this->settings[$key]) {
$this->hasBeenModified = true;
}