From: Roland Häder Date: Tue, 29 Mar 2011 18:16:48 +0000 (+0000) Subject: Added __unset() to catch unsetting of missing fields/attributes X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=f62f440da8b0f369da1879913202755f6d06559a;hp=f68549603f12edc09842108a287d420a16a7571f;ds=sidebyside Added __unset() to catch unsetting of missing fields/attributes --- 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 *