[wp-trac] [WordPress Trac] #39297: wrong return type in WP_User_Query::get_total()
WordPress Trac
noreply at wordpress.org
Thu Dec 15 14:46:28 UTC 2016
#39297: wrong return type in WP_User_Query::get_total()
--------------------------+-----------------------------
Reporter: runciters | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
As stated here:
https://developer.wordpress.org/reference/classes/wp_user_query/get_total/
WP_User_Query::get_total() method should return an integer value, but it
returns a string value:
https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-
user-query.php#L615
$total_users get its value from wpdb::get_var() which returns a string:
https://github.com/WordPress/WordPress/blob/master/wp-includes/wp-
db.php#L2270
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39297>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list