Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38602 closed defect (bug) (fixed)

WP_UnitTest_Factory_For_Network::get_object_by_id() calling deprecated wp_get_network()

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.6
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Description

The WP_UnitTest_Factory_For_Network class's get_object_by_id() method is calling a function that was deprecated in WordPress 4.6: wp_get_network().

It can now safely be replaced with a call to get_network() instead.

(Discovered from failing tests in the WP Multi Network plugin.)

Attachments (1)

38602.patch (569 bytes) - added by johnjamesjacoby 8 years ago.

Download all attachments as: .zip

Change History (4)

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.


8 years ago

#2 @jeremyfelt
8 years ago

  • Milestone changed from Awaiting Review to 4.7
  • Owner set to jeremyfelt
  • Status changed from new to reviewing

Good catch, thanks @johnjamesjacoby.

#3 @jeremyfelt
8 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 39071:

Multisite: Use get_network() in WP_UnitTest_Factory_For_Network.

wp_get_network() was deprecated in 4.6.

Props johnjamesjacoby.
Fixes #38602.

Note: See TracTickets for help on using tickets.