summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-09 15:15:45 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-09 15:15:45 +0100
commit93455e31f1f88fa88394091a5156ac96e61c4179 (patch)
tree43bbe9f5e1cb621e52abd9371ceaa09db285e8ae /system/core
parentebdb1b86f4f39f4ab1a4063d4fdd565c3141877c (diff)
Fix E_WARNING in CI_Security::entity_decode() on PHP<5.3.4
Related: #3057 Previous commit: 487d1ae060e6414e0a59c9752a4914fa3b8c4710
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Security.php7
1 files changed, 6 insertions, 1 deletions
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