#2962 closed defect (bug) (fixed)
Use `get_sites()` for muiltisite PHPUnit testcase in `BBP_UnitTestCase::tearDown`
| Reported by: | netweb | Owned by: | netweb |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6 |
| Component: | Tools - Unit Tests | Version: | |
| Severity: | major | Keywords: | needs-patch |
| Cc: |
Description
WordPress 4.6 deprecated wp_get_sites(), switch to the replacement get_sites()
Attachments (2)
Change History (6)
#2
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed
- Severity normal → major
- Status closed → 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_Siteobjects rather than the array of arrays.
jeremyfelt [3:59] So a replacement, but not a straight replacement
In 6060: