Fatal error when updating with invalid license
jamesckemp opened this issue · 5 comments
Steps to reproduce:
- Install 2 or more uplink-based plugins. (Flux and Account Pages on
feature/uplink
are a good option). - Set the version lower to those on PUE.
- Enter an invalid license key for the plugin you want to update.
- Try to update via
update-core.php
admin page.
Issue:
Fatal Error:
[03-Aug-2023 15:43:30 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Iconic_WAP_NS\StellarWP\Uplink\Admin\Package_Handler::filter_upgrader_pre_download() must be of the type bool, object given, called in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Provider.php on line 179 and defined in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Package_Handler.php:34
Stack trace:
#0 /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Provider.php(179): Iconic_WAP_NS\StellarWP\Uplink\Admin\Package_Handler->filter_upgrader_pre_download(Object(WP_Error), 'invalid_license', Object(Plugin_Upgrader), Array)
#1 /app/wp-includes/class-wp-hook.php(308): Iconic_WAP_NS\StellarWP\Uplink\Admin\Provider->filter_upgrader_pre_download(Object(WP_Error), 'invalid_license', Object(Plugin_Upgrader), Array)
#2 /app/wp-includes/plugin.php(205): WP_Hook->apply_filters(Object(WP_Error), Array)
#3 /app/wp-admin/includes/c in /app/wp-content/plugins/iconic-woo-account-pages/vendor-prefixed/stellarwp/uplink/src/Uplink/Admin/Package_Handler.php on line 34
Notes:
This issue only seems to occur when 2 uplink-based plugins are running. When there's only one, it displays a notice instead of a fatal error.
@defunctl seeing a couple more reports of this error in the wild via the helpdesk, although I don't have information yet around whether the invalid licensing portion of James's original report can be replicated here.
Do you have any capacity to take a look?
@davegreenwp I believe this PR that Ben opened is the fix, are you able to give it a try?
However, the PR is going to another branch so you may need to cherry pick it.
@davegreenwp that's released here https://github.com/stellarwp/uplink/releases/tag/v1.4.2
Give it a try, however note that customers experiencing this issue would need to manually update their plugins.
thanks @defunctl I'll carve out some time tomorrow to pull these changes into the two plugins in question and get some pre-release copies to the customers who reported. I know at least one has a staging environment.