General: Ensure bookmark query limits are numeric.

Props paulkevan, xknown.

git-svn-id: https://develop.svn.wordpress.org/trunk@53959 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-08-30 15:14:04 +00:00
parent 6fa43a1d5b
commit dc874c5cd2

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 );