summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2011-10-20 09:11:59 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-10-27 00:58:29 +0200
commit75b1f3991013c17cacac18e47879c483fe1cf542 (patch)
treef6434e64e19668a8f691f0850ea3ecb8b026abe8 /system/core
parent6eab49a844b3542a5efee6620233a86f645a30f5 (diff)
get_magic_quotes_gpc() to be executed only if PHP version is 5.3 or lower
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/Input.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 5a033e7b8..9bfb5f1fb 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -548,8 +548,12 @@ class CI_Input {
return $new_array;
}
- // We strip slashes if magic quotes is on to keep things consistent
- if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
+ /* We strip slashes if magic quotes is on to keep things consistent
+
+ NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
+ it will probably not exist in future versions at all.
+ */
+ if ( ! is_php('5.4') && get_magic_quotes_gpc())
{
$str = stripslashes($str);
}
@@ -714,7 +718,6 @@ class CI_Input {
}
}
-// END Input class
/* End of file Input.php */
-/* Location: ./system/core/Input.php */
+/* Location: ./system/core/Input.php */ \ No newline at end of file