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 8cbcd1d..85dd986 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
         *
        /**
         * Setter for database result instance
         *