diff options
Diffstat (limited to 'wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php')
-rw-r--r-- | wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php index 4c44f67..cc1c302 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php @@ -152,7 +152,7 @@ class WP_REST_Search_Controller extends WP_REST_Controller { $total = (int) $result[ WP_REST_Search_Handler::RESULT_TOTAL ]; $page = (int) $request['page']; $per_page = (int) $request['per_page']; - $max_pages = ceil( $total / $per_page ); + $max_pages = (int) ceil( $total / $per_page ); if ( $page > $max_pages && $total > 0 ) { return new WP_Error( |