From b75faa1a03a32330e412f0bd0332fb9fa389e914 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 27 Apr 2012 12:03:32 -0400 Subject: Fix rest of the helpers --- system/helpers/xml_helper.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'system/helpers/xml_helper.php') diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 67fd34b97..958c633dd 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -37,15 +37,15 @@ // ------------------------------------------------------------------------ -/** - * Convert Reserved XML characters to Entities - * - * @param string - * @param bool - * @return string - */ if ( ! function_exists('xml_convert')) { + /** + * Convert Reserved XML characters to Entities + * + * @param string + * @param bool + * @return string + */ function xml_convert($str, $protect_all = FALSE) { $temp = '__TEMP_AMPERSANDS__'; -- cgit v1.2.3-24-g4f1b From 773ccc318f2769c9b7579630569b5d8ba47b114b Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:11:08 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/helpers --- system/helpers/xml_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/xml_helper.php') diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 958c633dd..1431777d2 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -54,7 +54,7 @@ if ( ! function_exists('xml_convert')) // ampersands won't get messed up $str = preg_replace('/&#(\d+);/', $temp.'\\1;', $str); - if ($protect_all == TRUE) + if ($protect_all === TRUE) { $str = preg_replace('/&(\w+);/', $temp.'\\1;', $str); } @@ -66,7 +66,7 @@ if ( ! function_exists('xml_convert')) // Decode the temp markers back to entities $str = preg_replace('/'.$temp.'(\d+);/', '&#\\1;', $str); - if ($protect_all == TRUE) + if ($protect_all === TRUE) { return preg_replace('/'.$temp.'(\w+);/', '&\\1;', $str); } -- cgit v1.2.3-24-g4f1b