Opened 3 months ago

Last modified 7 weeks ago

#23683 reopened defect (bug)

Fatal error in WP_User_Query

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Priority: normal Milestone: 3.5.2
Component: Users Version: 3.4
Severity: normal Keywords: has-patch commit fixed-major
Cc:

Description

To reproduce in single site:

  1. Go to Users screen.
  2. Enter a URL into the search input and click "Search Users".
  3. You'll see a fatal error:
    Fatal error: Call to undefined function wp_is_large_network() in wp-includes/user.php on line 477
    

wp_is_large_network() is only defined in Multisite admin:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/ms.php#L696

This can be reproduced when using WP_User_Query on front-end as well (in single site and Multisite). Introduced in [19886].

Attachments (2)

23683.patch (2.0 KB) - added by SergeyBiryukov 3 months ago.
23683.2.patch (2.7 KB) - added by SergeyBiryukov 3 months ago.

Download all attachments as: .zip

Change History (11)

23683.patch moves the function to ms-functions.php, which could also help in #22917.

  • Milestone changed from 3.6 to 3.5.2

Looks good.

  • Keywords commit added

23683.patch doesn't actually fix the error in single site. 23683.2.patch should do that.

Might be easier to read as:

elseif ( preg_match('|^https?://|', $search) && ! ( is_multisite() && wp_is_large_network( 'users' ) ) )
  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 23664:

Fix fatal error in WP_User_Query when searching users by URL. Move wp_is_large_network() to wp-includes. fixes #23683 for trunk.

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 3.5.2 consideration.

  • Keywords fixed-major added
Note: See TracTickets for help on using tickets.