From 1e58e9b1ff8e144ddd691b544870db51b3325729 Mon Sep 17 00:00:00 2001 From: Jonathan Heard Date: Thu, 13 Nov 2025 12:06:15 +0000 Subject: [PATCH] Bugfix: After upgrading to Laravel 10, attempts to access attributes on a macsidigital/laravel-zoom Meeting throw undefined method exception for preventsAccessingMissingAttributes() - This is due the Macsi version of HasAttributes including the Laravel HasAttributes trait, which assumes this method exists when checking 'model' attribute access --- src/Support/Resource.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Support/Resource.php b/src/Support/Resource.php index e7effc3..dde9de8 100644 --- a/src/Support/Resource.php +++ b/src/Support/Resource.php @@ -12,6 +12,8 @@ class Resource public $client; + protected static $ResourcesShouldPreventAccessingMissingAttributes = false; + public function __construct(Entry $client = null, $attributes = []) { $this->client = $client; @@ -21,6 +23,18 @@ public function __construct(Entry $client = null, $attributes = []) $this->fill($attributes); } + + /** + * Determine if accessing missing attributes is disabled. + * Nested Requirement originating from the Laravel 10 HasAttributes Trait + * + * @return bool + */ + public static function preventsAccessingMissingAttributes() + { + return static::$ResourcesShouldPreventAccessingMissingAttributes; + } + /** * Fill the model with an array of attributes. *