diff --git a/CHANGELOG.md b/CHANGELOG.md index 3536ef2d..26a1e594 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - fix: Check if classes are loaded by a different autoloader before attempting to autoload them. H/t @cvanh - fix: Return `wp_max_upload_size()` instead of `null` if `GfFieldWithFileSizeSetting.maxFileSize` is `null`. H/t @Gytjarek +- fix: Fix typo in Autoloader release URL. +- fix: Ensure a valid source ID exists before attempting to resolve a `connectedFormField`. - ci: Replace calls to `docker-compose` with `docker compose`. ## v0.13.0 diff --git a/src/Autoloader.php b/src/Autoloader.php index ef8154df..05c384a4 100644 --- a/src/Autoloader.php +++ b/src/Autoloader.php @@ -69,7 +69,7 @@ protected static function missing_autoloader_notice(): void { // Translators: %s is a link to the latest release file. $error_message = __( 'WPGraphQL for GF: The Composer autoloader was not found. This usually means you downloaded the repository source code instead of the latest %s release file. If you are intentionally using the GitHub source code, make sure to run `composer install`.', 'wp-graphql-gravity-forms' ); - $release_link = 'wp-graphql-gravityforms.zip'; + $release_link = 'wp-graphql-gravity-forms.zip'; if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { error_log( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- This is a development notice. diff --git a/src/Type/WPObject/FieldError.php b/src/Type/WPObject/FieldError.php index 8d570c5a..af9a29b8 100644 --- a/src/Type/WPObject/FieldError.php +++ b/src/Type/WPObject/FieldError.php @@ -51,7 +51,7 @@ public static function get_fields(): array { 'type' => FormField::$type, 'description' => __( 'The form field that the error is connected to.', 'wp-graphql-gravity-forms' ), 'resolve' => static function ( $source, array $args, AppContext $context ) { - if ( ! isset( $source['id'] ) || ! isset( $source['formId'] ) ) { + if ( empty( $source['id'] ) || empty( $source['formId'] ) ) { return null; } diff --git a/src/Type/WPObject/Order/OrderItem.php b/src/Type/WPObject/Order/OrderItem.php index 009df377..b8270033 100644 --- a/src/Type/WPObject/Order/OrderItem.php +++ b/src/Type/WPObject/Order/OrderItem.php @@ -109,7 +109,7 @@ public static function get_fields(): array { 'type' => FormField::$type, 'description' => __( 'The form field that the order item is connected to', 'wp-graphql-gravity-forms' ), 'resolve' => static function ( $source, array $args, AppContext $context ) { - if ( ! isset( $context->gfForm ) || ! isset( $source['id'] ) ) { + if ( ! isset( $context->gfForm ) || empty( $source['id'] ) ) { return null; }