]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseModel.php
Issue 9657: Check the age of an item
[friendica.git] / src / BaseModel.php
index 8f9370bb09aa4f2b1574e49ec2c02918b4959fa1..41320d8bd5bcf528529b9a6f623babf9bfe84508 100644 (file)
@@ -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');
                }
        }