Skip to content

Commit 2032c83

Browse files
committed
Call get_magic_quotes_gpc() for PHP < 5.4.0-dev
1 parent a0dc91d commit 2032c83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/request/sfWebRequest.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function initialize(sfEventDispatcher $dispatcher, $parameters = array(),
7575
parent::initialize($dispatcher, $parameters, $attributes, $options);
7676

7777
// GET parameters
78-
if (version_compare(PHP_VERSION, '5.4', '<') && get_magic_quotes_gpc())
78+
if (version_compare(PHP_VERSION, '5.4.0-dev', '<') && get_magic_quotes_gpc())
7979
{
8080
$this->getParameters = sfToolkit::stripslashesDeep($_GET);
8181
}
@@ -155,7 +155,7 @@ public function initialize(sfEventDispatcher $dispatcher, $parameters = array(),
155155
$this->setMethod(self::GET);
156156
}
157157

158-
if (version_compare(PHP_VERSION, '5.4', '<') && get_magic_quotes_gpc())
158+
if (version_compare(PHP_VERSION, '5.4.0-dev', '<') && get_magic_quotes_gpc())
159159
{
160160
$this->postParameters = sfToolkit::stripslashesDeep($postParameters);
161161
}
@@ -615,7 +615,7 @@ public function getCookie($name, $defaultValue = null)
615615

616616
if (isset($_COOKIE[$name]))
617617
{
618-
if (version_compare(PHP_VERSION, '5.4', '<') && get_magic_quotes_gpc())
618+
if (version_compare(PHP_VERSION, '5.4.0-dev', '<') && get_magic_quotes_gpc())
619619
{
620620
$retval = sfToolkit::stripslashesDeep($_COOKIE[$name]);
621621
}

0 commit comments

Comments
 (0)