Hi,
After upgrading our server to PHP 8, we are getting a lot of Warnings in the logs. These aren't causing bugs for users, but our logs are being flooded!
The main culprit is this one:
PHP Warning: Undefined array key "guest_can_comment" in /site/wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Form.php on line 1731
but there's also this one:
PHP Warning: Undefined array key "show_subscription_bar" in /site/wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Form.php on line 218
Both of these weren't an issue in PHP 7, but PHP 8 is a little stricter about these things.
The simplest solution is to wrap these checks in
!empty()
so that, for example, line 218 would become:
$isSubscriptionBarEnabled = ! empty( $this->generalOptions["show_subscription_bar"] );
We'll check and get back to you soon.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
The issue will be fixed in the next version of the wpDiscuz plugin.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
That's great, thank you @asti !

