X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseEntity.php;h=065d100fa3245e4332c4842c3c3cfa3fc15ee2f1;hb=b0898ada2942e4207b0fb6dfacb8ffbdd3c6945e;hp=66acab1bb0eb4d42d2a8872ba1f4dcdea34507d4;hpb=9a4128a5c8af7c9791d9196266cbec43c11adb16;p=friendica.git diff --git a/src/BaseEntity.php b/src/BaseEntity.php index 66acab1bb0..065d100fa3 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); + } }