summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2011-10-20 09:11:59 +0200
committerAndrey Andreev <narf@bofh.bg>2011-10-20 09:11:59 +0200
commitaf7286251ec2c0dfd69ae764dbc0e3e8d0b736bf (patch)
tree3758531109b45ba2a0e72b2d95a689de43adf6a0 /system/libraries/Email.php
parent9fca615492ba481f5c27890b3b61f0603f45c55b (diff)
get_magic_quotes_gpc() to be executed only if PHP version is 5.3 or lower
Diffstat (limited to 'system/libraries/Email.php')
-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 c7d0bc52b..83a4eefb1 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -383,9 +383,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);
}