Joe
Forum Replies Created
-
Forum: Plugins
In reply to: [Login With Ajax - Fast Logins, 2FA, Redirects] Form placeholder textThanks @netweblogic!
Forum: Plugins
In reply to: [Login With Ajax - Fast Logins, 2FA, Redirects] Form placeholder textI used a template file for the placeholder text, works well. Any thoughts on the error message? Thanks!
Forum: Plugins
In reply to: [Membership Plugin - Restrict Content] PHP Warnings (PHP 8.1)And this one…
[12-May-2022 10:59:52 UTC] PHP Warning: Attempt to read property "ID" on null in /mywebsite.com/wp-content/plugins/restrict-content-pro/includes/admin/admin-actions.php on line 50
Forum: Plugins
In reply to: [Membership Plugin - Restrict Content] PHP Warnings (PHP 8.1)We have a busy production site with 750 members in and out all day so it’s difficult to pinpoint.
We’ve had great success with PHP 8.1 fortunately and have only found PHP warnings of future depreciations rather than any groundbreaking errors or issues.
If anything else comes to light I’ll give you a shout.
PS: I should add that this code change was given to the developer of the plugin prior to posting in this thread. Just hoping to help out @sajtfokus.
Yes indeed, a depreciation notice but if the user wishes to not have it trigger the notice in their error log they can fix it as above until a new release is presented, as mentioned. Hope it helps!
To fix this error before a new release addresses the issue in
wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php
changenull
to''
in line 310 as below. Removing the function entirely will cause a fatal error, so keep the function.Original line 310:
function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) {
New line 310:
function as_get_datetime_object( $date_string = '', $timezone = 'UTC' ) {
To fix this error before a new release addresses the issue change
null
to''
in line 310 as below. Removing the function entirely will cause a fatal error, so keep the function.Original line 310:
function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) {
New line 310:
function as_get_datetime_object( $date_string = '', $timezone = 'UTC' ) {
Thanks for the quick work @giuse! We’ve not seen the fatal error since installing the new version.
That’s great – I’ll let you know how it goes, I’m sure it’ll be fine.
Unrelated to the above issue, but a PHP 8.1 PHP warning for you:
PHP Warning: Undefined variable $loc in /mywebsite.com/wp-content/plugins/freesoul-deactivate-plugins/admin/templates/pages/eos-dp-terms-archive.php on line 84
3hrs later and we’ve seen several instances of the error show up unfortunately.
I suspect the error is triggered when FDP calls sanitize_file_name for requests that are not normal page loads. Do you maybe use WP CLI?
– I don’t use WP CLI.
– Could you think of what “requests that are not normal page loads” might be?We have almost the same setup (plugins, theme, snippets, settings) on another website for a different geographical market and don’t see the same error, so your comment about it not being a PHP 8.1 fault seems correct. I don’t know what is different on site 1 that is causing this!
Thanks for your quick work on this @giuse – we’ve installed it and will give it some time to see how our users interact with the site, and attempt to monitor what’s happening.
Forum: Plugins
In reply to: [URL Params] Undefined array key using PHP 8.1For anyone else experiencing the same issue while running PHP 8.1 until a fix is release:
Line 98 original:
if($_REQUEST[$param])
Change to:
if(isset($_REQUEST[$param]))
That’s a great idea @giuse – I’ll try that tomorrow. However, it also served as a reminder that we’ve ironed out almost all issues
Enable jQuery Migrate Helper
was employed to help with, so it wouldn’t be a bad time to fix the last issues and then remove it fully from our sites.