Skip to content

Commit

Permalink
Fix TemplateConfiguration undefined attribute warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Dec 30, 2017
1 parent d9a9528 commit f75dc40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/models/TemplateConfiguration.php
Expand Up @@ -999,7 +999,10 @@ public function __get($name)
$sAttribute = parent::__get($name);
if ($sAttribute === 'inherit') {
// NOTE: this is object recursive (if parent configuration field is set to inherit, then it will lead to this method again.)
$sAttribute = (isset($this->getParentConfiguration()->$name) ? $this->getParentConfiguration()->$name : null);
$sAttribute = null;
if(property_exists($this->getParentConfiguration(), $name)){
$sAttribute = $this->getParentConfiguration()->$name;
}
}
} else {
$sAttribute = parent::__get($name);
Expand Down

0 comments on commit f75dc40

Please sign in to comment.