-
Notifications
You must be signed in to change notification settings - Fork 23
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
“Deprecated: ltrim()…” warnings on manage subscription user page #806
Comments
This has been fixed and pushed already. |
As per my comment in the Wordpress support topic (apologies for doubling up, I'll be using Github only for bug reports from now on): I applied the patch and it did not fix the issue for me. I even wiped my test installation and started clean, installed the plugin, applied the patch, verified the file change. It's still showing those same warnings. |
@aayla-secura Are you using only GetPaid plugin or using GeoDirectory Pricing Manager plugin? Please update the plugin Pricing Manager if you are using it. If you still see issue then open a topic at https://wpgeodirectory.com/support/ so we can follow up quickly. Thanks, |
@kprajapatii No, I'm not using this plugin. The warnings are coming from passing the result of Here's a patch that fixes it. I tested it now:
I can create a pull request if you prefer. |
@aayla-secura On my test site no longer getting this error, so wanted to know in which causes the error occurred. I can update patch from my side. Thanks, |
@kprajapatii Strange, though it's possible I'm seeing it because I've enabled displaying of warnings and errors in the test install. 🤷 |
Pushed f5fd14c |
Testing on new WordPress 6.6.2 install with PHP 8.2. No other plugins activated. When I purchase a subscription from a test user with no administrative privileges and then go to the Manage Subscription page, e.g. /gp-subscriptions/?subscription=2 , there are multiple PHP deprecated warnings regarding passing null to ltrim or preg_replace:
It seems to be coming from WPInv_Subscriptions_List_Table::generate_item_markup on line 394 in admin/class-wpinv-subscriptions-list-table.php which tries to get the link to the edit page for an item or invoice and then passes that to esc_url without checking if it’s null.
see https://wordpress.org/support/topic/deprecated-ltrim-warnings-on-manage-subscription-user-page/
The text was updated successfully, but these errors were encountered: