From 93455e31f1f88fa88394091a5156ac96e61c4179 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Jan 2015 16:15:45 +0200 Subject: Fix E_WARNING in CI_Security::entity_decode() on PHP<5.3.4 Related: #3057 Previous commit: 487d1ae060e6414e0a59c9752a4914fa3b8c4710 --- system/core/Security.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/core/Security.php b/system/core/Security.php index 8ad0518a4..6b1140562 100755 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -644,7 +644,12 @@ class CI_Security { { if ( ! isset($_entities)) { - $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset)); + $_entities = array_map( + 'strtolower', + is_php('5.3.4') + ? get_html_translation_table(HTML_ENTITIES, $flag, $charset) + : get_html_translation_table(HTML_ENTITIES, $flag) + ); // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 // entities to the array manually -- cgit v1.2.3-24-g4f1b