summaryrefslogtreecommitdiffstats
path: root/system/libraries
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/libraries
parent6eab49a844b3542a5efee6620233a86f645a30f5 (diff)
get_magic_quotes_gpc() to be executed only if PHP version is 5.3 or lower
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 5f8d48682..c8b727c34 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -381,9 +381,13 @@ class CI_Email {
{
$this->_body = rtrim(str_replace("\r", "", $body));
- //strip slashes only if magic quotes is ON
- //if we do it with magic quotes OFF, it strips real, user-inputted chars.
- if (get_magic_quotes_gpc())
+ /* strip slashes only if magic quotes is ON
+ if we do it with magic quotes OFF, it strips real, user-inputted chars.
+
+ 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())
{
$this->_body = stripslashes($this->_body);
}