X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModel.php;h=41320d8bd5bcf528529b9a6f623babf9bfe84508;hb=c210e0b97f847501374a5d7609e13730e2c6c4dc;hp=8f9370bb09aa4f2b1574e49ec2c02918b4959fa1;hpb=8293d5ed0af78ae6cc5629bb1f982a7b29794d32;p=friendica.git diff --git a/src/BaseModel.php b/src/BaseModel.php index 8f9370bb09..41320d8bd5 100644 --- a/src/BaseModel.php +++ b/src/BaseModel.php @@ -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'); } }