#3636 closed defect (bug) (fixed)
Fatal error: array_merge(): Argument #1 must be of type array, string given in includes/forums/functions.php:2342
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6.14 | Priority: | normal |
| Severity: | major | Version: | 2.6.13 |
| Component: | Component - Forums | Keywords: | has-patch needs-testing |
| Cc: |
Description
BBpress: 2.6.13
WP: 6.8.1
Php: 8.1.28
I found this in my log files:
PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, string given in /wp-content/plugins/bbpress/includes/forums/functions.php:2342
Seems like the following doesn't always return an array, so a type check might be in order;
Get any existing not-in queries
$not_in = $posts_query->get( 'postnot_in', array() );
Add our not-in to existing
$not_in = array_unique( array_merge( $not_in, $forum_ids ) );
Change History (6)
This ticket was mentioned in PR #32 on bbpress/bbPress by @rollybueno.
6 months ago
#1
- Keywords has-patch added
#3
@
6 months ago
- Milestone changed from Awaiting Review to 2.6.14
- Owner set to johnjamesjacoby
- Status changed from new to assigned
Ensures is always an array before array_merge to prevent fatal error
Issue: https://bbpress.trac.wordpress.org/ticket/3636