From f62f440da8b0f369da1879913202755f6d06559a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 29 Mar 2011 18:16:48 +0000 Subject: [PATCH] Added __unset() to catch unsetting of missing fields/attributes --- inc/classes/main/class_BaseFrameworkSystem.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 8cbcd1df..85dd986a 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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 * -- 2.39.5