publishpress / WordPress-EDD-License-Integration

Basic classes for WordPress to integrate with EDD license keys
Other
0 stars 1 forks source link

Call to a member function get_error_message() on array #3

Closed andergmartins closed 4 years ago

andergmartins commented 4 years ago

The library has a bug where it tries to get the message from the response like it was an instance of WP_Error, and that is not always the case when the response returned a response code different than 200.

The error log sent by the user:

Ein Fehler vom Typ E_ERROR wurde in der Zeile 119 der Datei /home/user/wordpress/wp-content/plugins/publishpress-pro/vendor/alledia/wordpress-edd-license-integration/src/core/License.php verursacht. Fehlermeldung: Uncaught Error: Call to a member function get_error_message() on array in /home/user/wordpress/wp-content/plugins/publishpress-pro/vendor/alledia/wordpress-edd-license-integration/src/core/License.php:119 Stack trace:

  1. /home/user/wordpress/wp-content/plugins/publishpress-pro/modules/prosettings/prosettings.php(224): PublishPress\EDD_License\Core\License->validate_license_key()

  2. /home/user/wordpress/wp-content/plugins/publishpress-pro/modules/prosettings/prosettings.php(208): PP_ProSettings->validateLicenseKey()

  3. /home/user/wordpress/wp-includes/class-wp-hook.php(287): PP_ProSettings->validateModuleSettings()

  4. /home/user/wordpress/wp-includes/plugin.php(206): WP_Hook->apply_filters()

  5. /home/user/wordpress/wp-content/plugins/publishpress-pro/vendor/publishpress/publishpress/modules/settings/settings.php(421): apply_filters()

  6. /home/user/wordpress/wp-includes/class-wp-hook.php(287): PP_Settings->helper_settings_validate_and_save()

  7. /home/user/wordpress/wp-includes/class-wp-h