Opened 8 years ago
Closed 8 years ago
#7469 closed defect (bug) (fixed)
Adding condition check on page delete
Reported by: | raftaar1191 | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.2 |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
When I am running PHPUnit getting a Warning that
`PHP Warning: array_search() expects parameter 2 to be array, string given in wp-content/plugins/buddypress/src/bp-core/bp-core-functions.php on line 774
`
Attachments (1)
Change History (5)
#2
@
8 years ago
- Keywords commit added
- Milestone changed from 2.8.3 to 2.9
- Owner set to johnjamesjacoby
- Status changed from new to reviewing
Hi @raftaar1191, thanks for the report.
Every usage of bp_core_get_directory_page_ids()
assumes an array is returned. In addition, each usage has inconsistent type-casting on that return value.
We can (very safely) circumvent this (and potentially other similar issues) by ensuring it always returns an array, and removing the inconsistent type-casting.
Patch for ticket number 7469