Skip to content

Commit

Permalink
fixed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
hpaul committed May 5, 2012
1 parent 9708257 commit bba9ce0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions model.php
Expand Up @@ -411,6 +411,7 @@ public function __call($method, $parameters)
{
return call_user_func_array(array($this, '_' . $method), $parameters);
}
throw new \Exception("Method [$method] is not defined.");
}

/**
Expand All @@ -436,9 +437,9 @@ public function __set($key, $value)
*/
public static function __callStatic($method, $parameters)
{
$model = new static;
$model = get_called_class();

return call_user_func_array(array($model, '_' . $method), $parameters);
return call_user_func_array(array(new $model, $method), $parameters);
}

}

0 comments on commit bba9ce0

Please sign in to comment.