diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index 0e8cb651c70cf4fe8c89d5d45b77d83e7ce559a1..0717f53d9a92cb881d2414cf0002051c794dcbd5 100755 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -449,11 +449,16 @@ class simplePlugin implements SimpleTab } elseif (isset($this->attributesAccess[$name])) { $this->attributesAccess[$name]->setValue($value); } else { - /* Calling default behaviour */ - $this->$name = $value; + /* Ensure $name is an allowed property */ + if (property_exists($this, $name)) { + $this->$name = $value; + } else { + trigger_error("Attempted to set an undefined property: $name", E_USER_WARNING); + } } } + /*! \brief This function allows to use the syntax isset($plugin->attributeName) It returns FALSE if the attribute has an empty value.