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

stdClass instead of null for validation response #14

Closed
wants to merge 2 commits into from

Conversation

jamesckemp
Copy link
Contributor

Fatal error without this change:

[10-Feb-2023 09:54:39 UTC] PHP Fatal error:  Uncaught TypeError: Argument 3 passed to IconicWP\WAP\StellarWP\Uplink\API\Validation_Response::__construct() must be an instance of stdClass, null given, called in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/API/Client.php on line 241 and defined in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/API/Validation_Response.php:146
Stack trace:
#0 /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/API/Client.php(241): IconicWP\WAP\StellarWP\Uplink\API\Validation_Response->__construct('jsfgn', 'local', NULL, Object(IconicWP\WAP\StellarWP\Uplink\Resources\Plugin))
#1 /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Resources/Resource.php(492): IconicWP\WAP\StellarWP\Uplink\API\Client->validate_license(Object(IconicWP\WAP\StellarWP\Uplink\Resources\Plugin), 'jsfgn', 'local')
#2 /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefi in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/API/Validation_Response.php on line 146
[10-Feb-2023 09:59:38 UTC] PHP Notice:  Undefined index: default in /app/wp-content/plugins/iconic-woo-account-pages/inc/vendor/wp-settings-framework/wp-settings-framework.php on line 890

@borkweb
Copy link
Member

borkweb commented Feb 10, 2023

Oops. I approved this, but didn't realize the tests were failing. I'll take a look at those soon.

@jamesckemp
Copy link
Contributor Author

Closing this, as I no longer get a fatal when this is null. It must have been due to an outdated integration method when we first tested.

@jamesckemp jamesckemp closed this Aug 8, 2023
@jamesckemp jamesckemp deleted the fix/validation-response branch August 8, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants