![]() |
|
Hide/suppress PHP warnings - Printable Version +- MFGG Forums (https://forums.mfgg.net) +-- Forum: MFGG (https://forums.mfgg.net/forumdisplay.php?fid=4) +--- Forum: Suggestions (https://forums.mfgg.net/forumdisplay.php?fid=11) +--- Thread: Hide/suppress PHP warnings (/showthread.php?tid=3513) |
Hide/suppress PHP warnings - Louis Paul - 03-25-2026 When I go to My Alerts a PHP warning related to a MyBB plugin is displayed above the menu. This isn't good because it impacts the user experience, and it could reveal sensitive information. It would be best to hide or suppress the PHP warnings, and redirect any warnings and errors to a log file for further review. RE: Hide/suppress PHP warnings - VinnyVideo - 03-27-2026 It's even better to fix PHP issues than to hide or suppress their warning messages. These PHP warnings don't reveal anything sensitive, fortunately. Some MyBB plugin isn't fully compatible with PHP 8.x and throws these warnings under certain circumstances. I'm not sure whether these plugins need updating, or if we just need to deactivate/reactivate them. RE: Hide/suppress PHP warnings - Louis Paul - 03-27-2026 (03-27-2026, 03:39 PM)VinnyVideo Wrote: It's even better to fix PHP issues than to hide or suppress their warning messages. Yeah, it would be better to fix these issues, but it depends either on the MyBB plugin author updating it, or fixing it yourself and tracking the changes made on the code. The reason I said to hide the PHP warnings (and redirecting any issues to a log file) is because I had experience with WordPress and PHP in general, and showing these warnings directly on the page isn't a good user experience for the average user. RE: Hide/suppress PHP warnings - VinnyVideo - 03-29-2026 The warning that appears in alerts.php should be fixed now. If you'd like to be helpful, you could 1-Up one of my posts in this topic so I can verify that I don't get a warning when I open a topic containing an unread alert. I installed an updated version of the OUGC Alerts plugin, which seemed to fix these errors. The multi-badge counters aren't displaying now, so I'll need to see why those disappeared. RE: Hide/suppress PHP warnings - VinnyVideo - 03-29-2026 @littlelum Thanks for 1-Upping my post. Looks like the PHP warning is no longer displaying when you click on a topic with an unread alert. RE: Hide/suppress PHP warnings - VinnyVideo - 04-03-2026 Upon further review, we're still getting PHP warnings when we open topics containing unread notifications. Opening alerts.php is working fine though. I'll probably need to refresh the sandbox environment and see if deactivating/reactivating certain plugins helps. If it doesn't, I'll need to contact the plugin developer. RE: Hide/suppress PHP warnings - Louis Paul - 04-03-2026 I can confirm this, I opened this thread with the reply unread notification and three PHP warnings were displayed on the page about undefined variables. When the page is refreshed, the warnings aren't displayed anymore until a new unread notification is created. |