mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
Allow models extending BaseModel to have an id equal to 0
This commit is contained in:
parent
c9c3d022bd
commit
bb99b0bebe
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ abstract class BaseModel extends BaseEntity
|
|||
|
||||
protected function checkValid()
|
||||
{
|
||||
if (empty($this->data['id'])) {
|
||||
if (!isset($this->data['id']) || is_null($this->data['id'])) {
|
||||
throw new HTTPException\InternalServerErrorException(static::class . ' record uninitialized');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue