bbPress 论坛在 2.5.12和 2.5.13版本 如果服务器升级到 PHP 7.1 版本,打开版块链接的时候回出现以下错误。
[31-Jul-2017 08:12:42 UTC] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/user/public_html/wp-content/plugins/bbpress/includes/forums/functions.php:1800
Stack trace:
#0 /home/user/public_html/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))
#1 /home/user/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#2 /home/user/public_html/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
#3 /home/user/public_html/wp-includes/class-wp-query.php(1683): do_action_ref_array('pre_get_posts', Array)
#4 /home/user/public_html/wp-includes/class-wp-query.php(3248): WP_Query->get_posts()
#5 /home/user/public_html/wp-includes/class-wp.php(617): WP_Query->query(Array)
#6 /home/user/public_html/wp-includes/class-wp.php(735): WP->query_posts()
#7 /home/user/public_html/wp-includes/functions.php(955): WP->main('')
#8 /home/user/public_html/wp-blog-h in /home/user/public_html/wp-content/plugins/bbpress/includes/forums/functions.php on line 1800
解决方法要么是升级到 2.6版本,要么就是修改下 functions.php 文件的 1800 行。