From 05d2877cc169d9f31f43e42a7c6aea5dd10facaf Mon Sep 17 00:00:00 2001 From: Svennd Date: Wed, 9 Feb 2022 21:13:25 +0100 Subject: Update Profiler.php check for null value on $val --- system/libraries/Profiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 5531f3366..3c6a464d3 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -496,7 +496,7 @@ class CI_Profiler { } $output .= '' - .$config.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$config.'  '.$pre.htmlspecialchars((($val) ? $val :''), ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b From 9d30b03e35d6ed04ac287118f8d62625e81f9923 Mon Sep 17 00:00:00 2001 From: Svennd Date: Thu, 10 Feb 2022 08:52:09 +0100 Subject: Update Profiler.php fix it with string casting instead, based on feedback of jamieburchell :) thanks ! --- system/libraries/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 3c6a464d3..65eb3c3e3 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -496,7 +496,7 @@ class CI_Profiler { } $output .= '' - .$config.'  '.$pre.htmlspecialchars((($val) ? $val :''), ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$config.'  '.$pre.htmlspecialchars((string)$val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; @@ -534,7 +534,7 @@ class CI_Profiler { } $output .= '' - .$key.'  '.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$key.'  '.$pre.htmlspecialchars((string)$val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b From affe39415ddded1174cf405e4f86d56850197493 Mon Sep 17 00:00:00 2001 From: Svennd Date: Fri, 11 Feb 2022 16:34:07 +0100 Subject: required spaces around cast --- system/libraries/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 65eb3c3e3..cf178663e 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -496,7 +496,7 @@ class CI_Profiler { } $output .= '' - .$config.'  '.$pre.htmlspecialchars((string)$val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$config.'  '.$pre.htmlspecialchars( (string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; @@ -534,7 +534,7 @@ class CI_Profiler { } $output .= '' - .$key.'  '.$pre.htmlspecialchars((string)$val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$key.'  '.$pre.htmlspecialchars( (string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b From 7e25c1830dfd61fe38d370e0b2e0f6c740265fac Mon Sep 17 00:00:00 2001 From: Svennd Date: Sat, 12 Feb 2022 20:33:55 +0100 Subject: feedback from narfbg --- system/libraries/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index cf178663e..5abc324dc 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -496,7 +496,7 @@ class CI_Profiler { } $output .= '' - .$config.'  '.$pre.htmlspecialchars( (string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$config.'  '.$pre.htmlspecialchars((string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; @@ -534,7 +534,7 @@ class CI_Profiler { } $output .= '' - .$key.'  '.$pre.htmlspecialchars( (string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; + .$key.'  '.$pre.htmlspecialchars((string) $val, ENT_QUOTES, config_item('charset')).$pre_close."\n"; } return $output."\n"; -- cgit v1.2.3-24-g4f1b