get_magic_quotes_gpc() to be executed only if PHP version is 5.3 or lower
diff --git a/system/core/Input.php b/system/core/Input.php
index 6f84421..f8e8906 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -554,8 +554,12 @@
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);
}