X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=dca1af4f627b2e29a5494af84bd2666496ce63de;hb=7b02585b978f7aef9d5c5a2c5d2b238cb674a4b7;hp=a5b968397c7058c72b7c94d59664a90f2f73e3b8;hpb=53e38b03130ea798bba44db44ccb7f331dc4b91d;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index a5b968397c..dca1af4f62 100644 --- a/src/BaseEntity.php +++ b/src/BaseEntity.php @@ -1,6 +1,6 @@ $name; } + + /** + * @param mixed $name + * @return bool + * @throws HTTPException\InternalServerErrorException + */ + public function __isset($name): bool + { + if (!property_exists($this, $name)) { + throw new HTTPException\InternalServerErrorException('Unknown property ' . $name . ' of type ' . gettype($name) . ' in Entity ' . static::class); + } + + return !empty($this->$name); + } }