DbObject: don't ->getId() for ->id

This commit is contained in:
Thomas Gelf 2015-07-02 14:10:40 +02:00
parent 6e0b430dcc
commit 02c7a5c62c
1 changed files with 2 additions and 1 deletions

View File

@ -212,7 +212,8 @@ abstract class DbObject
if (substr($func, -2) === '[]') {
$func = substr($func, 0, -2);
}
if (method_exists($this, $func)) {
// TODO: id check avoids collision with getId. Rethink this.
if ($property !== 'id' && method_exists($this, $func)) {
return $this->$func();
}