fix: prevent fatal error if used with old version of Appsero Client #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are getting multiple fatal error reports after updating the Appsero/Client library. The use cases are virtually infinite. Let me explain a bit further.
Some users are using the latest version of the Dokan Lite plugin and an old version of the Dokan Pro plugin. From the old version of Dokan Pro, Appsero\Client::updater() has been called and the user is getting a fatal error. In that case, there is no way the user will be able to update Dokan Pro since their site is inaccessible. Kindly check the error details here: FATAL ERROR =v3.9.9 Jan 29, 2024 getdokan/dokan#2160
Site user updated Dokan or any other plugin with the latest version of Appsero/Client. Some plugins still use the old version configured. From there plugin Appsero\Client::updater() was called. The user is getting a fatal error.
Below is an example:
Proposed Solution
The proposed solution will prevent the fatal error as well as display a deprecated warning to update the Appsero client library. Also, the proposed solution includes the new Updater Method ie:
\Appsero\Updater::init( $this )
being called from the deprecatedClient::updater()
method.