The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Bug [Solved] PHP 8 Warnings

4 Posts
2 Users
2 Reactions
1,600 Views
(@joloco)
Posts: 2
New Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#7745]

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"] );

 
Posted : 06/11/2023 2:59 pm
Asti
 Asti
(@asti)
Posts: 8264
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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.

 
Posted : 06/11/2023 3:55 pm
joloco reacted
Asti
 Asti
(@asti)
Posts: 8264
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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.

 
Posted : 07/11/2023 9:50 am
joloco reacted
(@joloco)
Posts: 2
New Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

That's great, thank you @asti !


 
Posted : 07/11/2023 3:09 pm