From 36bce5f9396dcf2b1964f199cbc873d26caab679 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 26 Jan 2018 15:53:23 +0000 Subject: [PATCH 1/2] Cast min, max, and value to int Fixes #18613 --- includes/customizer/class-wc-shop-customizer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/customizer/class-wc-shop-customizer.php b/includes/customizer/class-wc-shop-customizer.php index 42a0a0f9a7e..4a0472466db 100644 --- a/includes/customizer/class-wc-shop-customizer.php +++ b/includes/customizer/class-wc-shop-customizer.php @@ -121,8 +121,10 @@ class WC_Shop_Customizer { wp.customize( 'woocommerce_catalog_columns', function( setting ) { setting.bind( function( value ) { - var min = ''; - var max = ''; + var min = parseInt( '' ); + var max = parseInt( '' ); + + value = parseInt( value ); if ( max && value > max ) { setting.notifications.add( 'max_columns_error', new wp.customize.Notification( From 2d952b1597c9249687fab594b6bb647fe6e25b56 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 26 Jan 2018 15:54:34 +0000 Subject: [PATCH 2/2] base 10 --- includes/customizer/class-wc-shop-customizer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/customizer/class-wc-shop-customizer.php b/includes/customizer/class-wc-shop-customizer.php index 4a0472466db..7b46b53671c 100644 --- a/includes/customizer/class-wc-shop-customizer.php +++ b/includes/customizer/class-wc-shop-customizer.php @@ -121,10 +121,10 @@ class WC_Shop_Customizer { wp.customize( 'woocommerce_catalog_columns', function( setting ) { setting.bind( function( value ) { - var min = parseInt( '' ); - var max = parseInt( '' ); + var min = parseInt( '', 10 ); + var max = parseInt( '', 10 ); - value = parseInt( value ); + value = parseInt( value, 10 ); if ( max && value > max ) { setting.notifications.add( 'max_columns_error', new wp.customize.Notification(