From 1cf70f99e87236de695596cf80019fc2a25cbde8 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Thu, 27 Feb 2025 17:35:39 +0000 Subject: [PATCH] :sparkles: (simplePlugin) - dynamic properties allowed in simplePlugin Allows dynamic properties in simplePlugin --- include/simpleplugin/class_simplePlugin.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index 0717f53d9..f46cb3fec 100755 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -28,6 +28,7 @@ * */ +#[AllowDynamicProperties] class simplePlugin implements SimpleTab { /*! \brief This attribute store all information about attributes */ @@ -450,15 +451,10 @@ class simplePlugin implements SimpleTab $this->attributesAccess[$name]->setValue($value); } else { /* 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. -- GitLab