From 916cef60068b255c9d7f1388bd72478c13596aa4 Mon Sep 17 00:00:00 2001 From: Darko Luketic Date: Mon, 29 Nov 2021 13:21:53 +0100 Subject: [PATCH] fix settings fatal error --- crayon_langs.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crayon_langs.class.php b/crayon_langs.class.php index ee6c156..baf7ab6 100644 --- a/crayon_langs.class.php +++ b/crayon_langs.class.php @@ -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; + } + } } }