summaryrefslogtreecommitdiffstats
path: root/system/libraries/Model.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Model.php')
-rw-r--r--system/libraries/Model.php6
1 files changed, 3 insertions, 3 deletions
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];