X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModel.php;h=41320d8bd5bcf528529b9a6f623babf9bfe84508;hb=d2ea3eabfb1f70324ff4fa7e7055e2c8a7dbc3d3;hp=2c952888b2e54edb766856756e7124252d70ced7;hpb=38e5733b6ee10f5a6dd7f017b6b6e7acfde80565;p=friendica.git diff --git a/src/BaseModel.php b/src/BaseModel.php index 2c952888b2..41320d8bd5 100644 --- a/src/BaseModel.php +++ b/src/BaseModel.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica; @@ -122,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'); } }