Opened 11 years ago
Closed 10 years ago
#23683 closed defect (bug) (fixed)
Fatal error in WP_User_Query
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5.2 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Users | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
To reproduce in single site:
- Go to Users screen.
- Enter a URL into the search input and click "Search Users".
- 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 (3)
Change History (16)
#5
@
11 years ago
23683.patch doesn't actually fix the error in single site. 23683.2.patch should do that.
#6
@
11 years ago
Might be easier to read as:
elseif ( preg_match('|^https?://|', $search) && ! ( is_multisite() && wp_is_large_network( 'users' ) ) )
#7
@
11 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 23664:
#8
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 3.5.2 consideration.
#10
@
10 years ago
Let's be a bit more conservative for 3.5.2 and simply aim to avoid the fatal error: 23683.diff.
The problem with moving a function from one file to another is that if the update fails in some very unexpected and uncaught way, the function could suddenly exist twice, which will result in fatal errors. I'd rather try to just fix the fatal without possibly introducing others in a minor release. (Checksums would, of course, make this better.)
23683.patch moves the function to
ms-functions.php
, which could also help in #22917.