From 6c4a15b429532714b0ad29a626e6faf1395f5353 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 17 Dec 2021 10:36:22 +0100 Subject: [PATCH] Treat undefined keys as NULL --- application/helpers/config_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/helpers/config_helper.php b/application/helpers/config_helper.php index 20b24b25..83a44f9d 100644 --- a/application/helpers/config_helper.php +++ b/application/helpers/config_helper.php @@ -99,7 +99,7 @@ if ( ! function_exists('js_config')) return NULL; } - $value = $js_config[$key]; + $value = $js_config[$key] ?? NULL; return $value ?? $default; } @@ -148,7 +148,7 @@ if ( ! function_exists('page_vars')) return NULL; } - $value = $page_vars[$key]; + $value = $page_vars[$key] ?? NULL; return $value ?? $default; }