Ticket #39297: class-wp-user-query-#39297-svn-test.diff
| File class-wp-user-query-#39297-svn-test.diff, 1.2 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/class-wp-user-query.php
612 612 * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. 613 613 */ 614 614 if ( isset( $qv['count_total'] ) && $qv['count_total'] ) 615 $this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );615 $this->total_users = (int) $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) ); 616 616 617 617 if ( !$this->results ) 618 618 return; -
tests/phpunit/tests/user/query.php
124 124 } 125 125 } 126 126 127 public function test_get_total() { 128 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) ); 129 $total_users = $users->get_total(); 130 131 $this->assertSame( 13, $total_users ); 132 } 133 127 134 /** 128 135 * @dataProvider orderby_should_convert_non_prefixed_keys_data 129 136 */
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)