fix settings fatal error

This commit is contained in:
Darko Luketic 2021-11-29 13:21:53 +01:00
parent 2eff1bf6d0
commit 916cef6006
1 changed files with 5 additions and 3 deletions

View File

@ -411,9 +411,11 @@ class CrayonLang extends CrayonVersionResource {
$name = trim(strtoupper($name));
if (array_key_exists($name, $this->elements) && $element === NULL) {
return $this->elements[$name];
} else if (@get_class($element) == CRAYON_ELEMENT_CLASS) {
$this->elements[$name] = $element;
}
} else if (is_object($element)) {
if (@get_class($element) == CRAYON_ELEMENT_CLASS) {
$this->elements[$name] = $element;
}
}
}
}