]> git.mxchange.org Git - core.git/commitdiff
Added __unset() to catch unsetting of missing fields/attributes
authorRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2011 18:16:48 +0000 (18:16 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2011 18:16:48 +0000 (18:16 +0000)
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
         *