Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: various 0.13.0 regressions #444

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading