General: Ensure bookmark query limits are numeric.

Props paulkevan, xknown.
Built from https://develop.svn.wordpress.org/trunk@53959


git-svn-id: http://core.svn.wordpress.org/trunk@53518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-08-30 15:17:08 +00:00
parent da3f89485a
commit a7edef876d
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ function get_bookmarks( $args = '' ) {
$query .= " $exclusions $inclusions $search";
$query .= " ORDER BY $orderby $order";
if ( -1 != $parsed_args['limit'] ) {
$query .= ' LIMIT ' . $parsed_args['limit'];
$query .= ' LIMIT ' . absint( $parsed_args['limit'] );
}
$results = $wpdb->get_results( $query );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53958';
$wp_version = '6.1-alpha-53959';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.