From 9a30d941176bb885a3c3ceeabfba7fd09414ff8e Mon Sep 17 00:00:00 2001 From: Markus Tiefenbacher Date: Thu, 15 Feb 2024 17:45:48 +0100 Subject: [PATCH] Fix for https://github.com/dadish/ProcessGraphQL/issues/80 Suggestion to fix this issue --- src/Utils.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Utils.php b/src/Utils.php index 69f2b202..ac41dc8e 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -200,10 +200,9 @@ public static function pwFieldToGraphqlClass(Field $field) // use third party field if available $thirdPartyFieldtypeClassName = "ProcessWire\\GraphQL\\Type\\Fieldtype\\FieldtypeThirdParty"; + $thirdPartyFieldtypeClassNameExists = $thirdPartyFieldtypeClassName::getThirdPartyClassName($field); if ( - class_exists( - $thirdPartyFieldtypeClassName::getThirdPartyClassName($field) - ) + $thirdPartyFieldtypeClassNameExists && class_exists($thirdPartyFieldtypeClassNameExists) ) { return $thirdPartyFieldtypeClassName; }