Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 29Jan 29 Yesterday I posted this in the wrong board (sorry):The most recent WP and plugin updates created a critical error/conflict with IP Board 4.7.19 and previous builds (at least back to April 2024).[28-Jan-2025 22:05:41 UTC] PHP Fatal error: Cannot redeclare mb_ucfirst() (previously declared in /home/XXXXX/public_html/members/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/symfony/polyfill-mbstring/bootstrap80.php:136) in /home/XXXXX/public_html/community/init.php(1601) : eval()'d code on line 2 [28-Jan-2025 21:58:53 UTC] PHP Fatal error: Cannot redeclare mb_ucfirst() (previously declared in /home/XXXXX/public_html/members/wp-content/plugins/wp-user-avatar/third-party/vendor/symfony/polyfill-mbstring/bootstrap80.php:136) in /home/XXXXX/public_html/community/init.php(1601) : eval()'d code on line 2 I implemented this suggested workaround:Otherwise, editing the code to this should work, too:/* Custom mb_ucfirst() function - eval'd so we can put into global namespace */ if ( !\function_exists('mb_ucfirst') ) { eval( ' function mb_ucfirst() { $text = \func_get_arg( 0 ); return mb_strtoupper( mb_substr( $text, 0, 1 ) ) . mb_substr( $text, 1 ); } '); }IPS can implement a fix to check if the function exists before running the eval() code. This function is included with PHP 8.4.0+, so it can be removed then. However, since v4 doesn't support PHP 8.2.+, we'll eventually get there with v5.0.0.I am posting to the Feedback forum (as requested in the original thread) for tracking purposes.