Added __unset() to catch unsetting of missing fields/attributes
[core.git] / inc / classes / main / class_BaseFrameworkSystem.php
index 8cbcd1df138445eda6ddd1767495a04c9eeea1eb..85dd986a4e0a2626a95d26028876518c01b9184e 100644 (file)
@@ -347,6 +347,18 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                ));
        }
 
+       /**
+        * Magic function to catch unsetting of missing fields/attributes
+        *
+        * @param       $name   Name of the field/attribute
+        * @return      void
+        */
+       public final function __unset ($name) {
+               $this->debugBackTrace(sprintf("Tried to unset a missing field. name=%s",
+                       $name
+               ));
+       }
+
        /**
         * Setter for database result instance
         *