[wp-trac] [WordPress Trac] #14511: new function - wp_get_sites($args)
WordPress Trac
noreply at wordpress.org
Thu Sep 12 23:56:46 UTC 2013
#14511: new function - wp_get_sites($args)
-------------------------------------+------------------
Reporter: transom | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Multisite | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Comment (by jeremyfelt):
[attachment: 14511.5.diff] adds basic unit tests and ensures proper return
of an empty array if no results return.
Replying to [comment:28 nacin]:
> * If get_results() returns no results, the response will be `array( 0
=> null )` — I imagine an empty array was desired.
I always got an empty array with how it was setup, though the updated
patch uses `$wpdb->get_results( $query, ARRAY_N )` to make sure an array
is returned rather than `null` if no results are found.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14511#comment:29>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list