diff --git a/models/user.php b/models/user.php index ea1e568..a9eb166 100644 --- a/models/user.php +++ b/models/user.php @@ -175,7 +175,7 @@ private function get_to_check() { $class = get_class(); - if(empty($this->to_check_cache)) + if(empty(static::$to_check_cache)) { $to_check = new $class; @@ -183,11 +183,11 @@ private function get_to_check() ->where('id', '=', $this->get_attribute('id')) ->first(); - $this->to_check_cache = $to_check; + static::$to_check_cache = $to_check; } else { - $to_check = $this->to_check_cache; + $to_check = static::$to_check_cache; } return $to_check;