From 449e2e174033d77d0998f97ecf6020a7ba1fa1f9 Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Wed, 10 Dec 2025 16:04:35 -0600 Subject: [PATCH] fix(php): use filter_var for proper boolean casting in config --- Inc/enqueue-scripts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inc/enqueue-scripts.php b/Inc/enqueue-scripts.php index 16b4d28b..71d51cb9 100644 --- a/Inc/enqueue-scripts.php +++ b/Inc/enqueue-scripts.php @@ -497,10 +497,10 @@ function roi_enqueue_adsense_loader() { $lazy_fill_timeout = roi_get_component_setting('adsense-placement', 'behavior', 'lazy_fill_timeout', '5000'); $config = array( - 'lazyEnabled' => (bool) $lazy_enabled, + 'lazyEnabled' => filter_var($lazy_enabled, FILTER_VALIDATE_BOOLEAN), 'rootMargin' => (int) $lazy_rootmargin . 'px 0px', 'fillTimeout' => (int) $lazy_fill_timeout, - 'debug' => defined('WP_DEBUG') && WP_DEBUG, + 'debug' => defined('WP_DEBUG') && WP_DEBUG ? true : false, ); wp_add_inline_script(