summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-10-20 13:22:11 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-10-20 13:22:11 +0200
commitf1c7f8931c4f8f155826b6932c8a7b3b0b6d1f19 (patch)
tree3758531109b45ba2a0e72b2d95a689de43adf6a0 /system/core
parent9fca615492ba481f5c27890b3b61f0603f45c55b (diff)
parentaf7286251ec2c0dfd69ae764dbc0e3e8d0b736bf (diff)
Merge pull request #600 from narfbg/ci-issue-467
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.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 6f8442107..f8e89066e 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -554,8 +554,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);
}