#2962 closed defect (bug) (fixed)
Use `get_sites()` for muiltisite PHPUnit testcase in `BBP_UnitTestCase::tearDown`
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | major | Version: | |
Component: | Tools - Unit Tests | Keywords: | needs-patch |
Cc: |
Description
WordPress 4.6 deprecated wp_get_sites()
, switch to the replacement get_sites()
Attachments (2)
Change History (6)
#2
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Severity changed from normal to major
- Status changed from closed to reopened
There's more to be done here.... Going to wait a few days for other tickets and commits to go in and revisit then
via https://wordpress.slack.com/archives/core-multisite/p1465451940000194
netweb [3:49 PM]: Much PHPUnit :boom:
netweb [3:56 PM]: Switched fromwp_get_sites()
toget_sites()
results inError: Cannot use object of type WP_Site as array
jeremyfelt [3:59 PM] That should be expected (need to write dev-notes).get_sites()
is a replacement, but returns an array ofWP_Site
objects rather than the array of arrays.
jeremyfelt [3:59] So a replacement, but not a straight replacement
In 6060: