From 1716cb80344dcb09dd263293b7901cd5b669e302 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 25 Oct 2006 05:12:34 +0000 Subject: --- system/libraries/Model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/libraries/Model.php') diff --git a/system/libraries/Model.php b/system/libraries/Model.php index 2fe93dd00..e0335bf45 100644 --- a/system/libraries/Model.php +++ b/system/libraries/Model.php @@ -35,13 +35,13 @@ class Model { */ function Model() { - // If the magic __get() method is used in a Model references can't be used. - $this->_assign_libraries( (method_exists($this, '__get')) ? FALSE : TRUE ); - //$this->_assign_libraries( (method_exists($this, '__get') OR method_exists('__set')) ? FALSE : TRUE ); + // If the magic __get() or __set() methods are used in a Model references can't be used. + $this->_assign_libraries( (method_exists($this, '__get') OR method_exists('__set')) ? FALSE : TRUE ); // We don't want to assign the model object to itself when using the // assign_libraries function below so we'll grab the name of the model parent $methods = get_class_methods($this); + if (isset($methods[0])) { $this->_parent_name = $methods[0]; -- cgit v1.2.3-24-g4f1b