The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Share:
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Bug [Solved] PHP 8 Warnings

4 Posts
2 Users
2 Reactions
1,035 Views
Posts: 2
Topic starter
(@joloco)
New Member
Joined: 2 years ago

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"] );
3 Replies
Asti
Posts: 8075
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

We'll check and get back to you soon.

2 Replies
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

The issue will be fixed in the next version of the wpDiscuz plugin.

(@joloco)
Joined: 2 years ago

New Member
Posts: 2

That's great, thank you @asti !

Share: