Skip to content

Commit

Permalink
Merge pull request #444 from justlevine/chore/misc-fixes
Browse files Browse the repository at this point in the history
fix: various 0.13.0 regressions
  • Loading branch information
justlevine authored Aug 2, 2024
2 parents dfeded3 + 3ad0e60 commit 718a2ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a href="https://github.com/axewp/wp-graphql-gravity-forms/releases/latest/download/wp-graphql-gravity-forms.zip" target="_blank">wp-graphql-gravityforms.zip</a>';
$release_link = '<a href="https://github.com/axewp/wp-graphql-gravity-forms/releases/latest/download/wp-graphql-gravity-forms.zip" target="_blank">wp-graphql-gravity-forms.zip</a>';

if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- This is a development notice.
Expand Down
2 changes: 1 addition & 1 deletion src/Type/WPObject/FieldError.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Type/WPObject/Order/OrderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 718a2ff

Please sign in to comment.