From ea41c8aa1951216b6a9ccc99832d69d2b41c5ead Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 26 Feb 2014 18:31:02 +0200 Subject: Don't use error suppression on realpath() + style adjustments --- system/helpers/xml_helper.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'system/helpers/xml_helper.php') diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php index 4c38b6988..5c1414b70 100644 --- a/system/helpers/xml_helper.php +++ b/system/helpers/xml_helper.php @@ -60,9 +60,11 @@ if ( ! function_exists('xml_convert')) $str = preg_replace('/&(\w+);/', $temp.'\\1;', $str); } - $str = str_replace(array('&', '<', '>', '"', "'", '-'), - array('&', '<', '>', '"', ''', '-'), - $str); + $str = str_replace( + array('&', '<', '>', '"', "'", '-'), + array('&', '<', '>', '"', ''', '-'), + $str + ); // Decode the temp markers back to entities $str = preg_replace('/'.$temp.'(\d+);/', '&#\\1;', $str); -- cgit v1.2.3-24-g4f1b