From b6658d23a5ee1732dedf6d9129fba1bbac5d047a Mon Sep 17 00:00:00 2001 From: Ramon Ramos Date: Tue, 13 Aug 2024 16:45:40 -0600 Subject: [PATCH] Update parameter sanitizing for Archive template --- .../mozilla-ai-intersections/archive-ai_intersections.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/mozilla-ai-intersections/archive-ai_intersections.php b/wp-content/themes/mozilla-ai-intersections/archive-ai_intersections.php index 4e81674..c012b4d 100644 --- a/wp-content/themes/mozilla-ai-intersections/archive-ai_intersections.php +++ b/wp-content/themes/mozilla-ai-intersections/archive-ai_intersections.php @@ -434,11 +434,11 @@ $records = new WP_Query( $args ); $records_count; - $records_current = ( $_GET['records'] ) ? $_GET['records'] : 8; + $records_current = ( $_GET['records'] ) ? intval($_GET['records']) : 8; $records_total = $records->found_posts; if ( isset( $_GET['records'] ) ): - $records_count = ( $_GET['records'] > $records_total ) ? $records_total : $_GET['records']; + $records_count = ( intval($_GET['records']) > $records_total ) ? $records_total : intval($_GET['records']); else: $records_count = ( $records_total < 8 ) ? $records_total : 8; endif;