Opened 7 years ago
Closed 7 years ago
#3204 closed defect (bug) (duplicate)
PHP 7.2 fatal error in bbp_pre_get_posts_normalize_forum_visibility()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Component - Forums | Keywords: | |
Cc: |
Description
While migrating a site to PHP 7.2, we noticed a new PHP fatal error in the bbp_pre_get_posts_normalize_forum_visibility()
function.
[22-Jun-2018 01:32:51 UTC] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/site/public_html/wp-content/plugins/bbpress/includes/forums/functions.php:2197 Stack trace: #0 /home/site/public_html/wp-includes/class-wp-hook.php(286): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query)) #1 /home/site/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 /home/site/public_html/wp-includes/plugin.php(531): WP_Hook->do_action(Array) #3 /home/site/public_html/wp-includes/class-wp-query.php(1711): do_action_ref_array('pre_get_posts', Array) #4 /home/site/public_html/wp-includes/class-wp-query.php(3360): WP_Query->get_posts() #5 /home/site/public_html/wp-includes/query.php(98): WP_Query->query(Array) #6 /home/site/public_html/wp-content/plugins/bbpress/includes/common/functions.php(1945): query_posts(Array) #7 /home/site/public_html/wp-includes/class-wp-hook.php(286): bbp_request_feed_trap(Array) #8 /home/site/public_html/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #9 /home/site/public_html/wp-content/plugins/bbpress/includes/core/sub-actions.php(470): apply_filters('bbp_request', Array) #10 /home/site/public_html/wp-includes/class-wp-hook.php(286): bbp_request(Array) #11 /home/site/public_html/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #12 /home/site/public_html/wp-includes/class-wp.php(376): apply_filters('request', Array) #13 /home/site/public_html/wp-includes/class-wp.php(735): WP->parse_request('') #14 /home/site/public_html/wp-includes/functions.php(995): WP->main('') #15 /home/site/public_html/wp-blog-header.php(16): wp() #16 /home/site/public_html/index.php(26): require('/home/site/pub...') #17 {main} thrown in /home/site/public_html/wp-content/plugins/bbpress/includes/forums/functions.php on line 2197
This seems to happen because WP_Query::get()
seems to return by default an empty string.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Closing as duplicate of #3031