From 7de1bbf98339f4bf94658d3d0a643b771c933b72 Mon Sep 17 00:00:00 2001 From: Luca Plozner Date: Wed, 15 Jul 2026 12:50:52 +0200 Subject: [PATCH] Add __isset support for fields in FileMakerRelation Co-authored-by: Junie --- src/Supporting/FileMakerRelation.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Supporting/FileMakerRelation.php b/src/Supporting/FileMakerRelation.php index ffafc8a..82c578d 100644 --- a/src/Supporting/FileMakerRelation.php +++ b/src/Supporting/FileMakerRelation.php @@ -217,6 +217,22 @@ public function __get($key) return $this->field($key); } + /** + * Handle the isset() function for the field or portal name. + * @param string $key The field or portal name. + * @return bool True if the field or portal exists. + * @ignore + */ + public function __isset(string $key): bool + { + try { + $this->field($key); + return true; + } catch (Exception $e) { + return false; + } + } + /** * Return the array of field names. *