Skip to content

Commit

Permalink
Change self to static in findOne method in order to allow child class…
Browse files Browse the repository at this point in the history
…es to override the find method and use that in the fineOne method
  • Loading branch information
markmercedes committed Jul 20, 2014
1 parent 7965474 commit 97108f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TRest/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function delete() {
* @return Model
*/
public static function findOne($id) {
return self::find()->findOne($id);
return static::find()->findOne($id);
}

public static function findOneByQuery($id, Query $query){
Expand Down

0 comments on commit 97108f2

Please sign in to comment.