MyBB Community Forums

Full Version: Age Restricted Thread Prefixes (2.0) - PHP Fatal Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://community.mybb.com/mods.php?action=view&pid=589

This plugin is throwing the following error which causes new thread/new post/edit post to hit the dreaded black page.
2024-04-22 11:41:06.673302 [NOTICE] [232245] [T0] [75.134.34.133:64780-H3:93296CE19BDBAD62-88#APVH_REDACTED.com:443] [STDERR] PHP Fatal error:  Uncaught Error: Undefined constant "prefixage_is_active" in /home/REDACTED/REDACTED/inc/plugins/prefixage.php:238\nStack trace:\n#0 /home/REDACTED/REDACTED/inc/class_plugins.php(142): prefixage_prevent_post()\n#1 /home/REDACTED/REDACTED/newthread.php(1165): pluginSystem->run_hooks()\n#2 {main}\n  thrown in /home/REDACTED/REDACTED/inc/plugins/prefixage.php on line 238\n

Anyone know of a fix for this? I'd love to use the plugin but if I can't then I'll figure something else out. Using PHP 8.2
Untested, but it looks like the fix is as simple as appending a pair of parens after prefixage_is_active on that line 238, to turn it into a function call.
Thanks, I'll give that a shot and get back here shortly. Smile