Skip to content

Commit bc3afe5

Browse files
committed
applied fix for get_magic_quotes_gpc deprecation
1 parent 2f0cead commit bc3afe5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/request/sfWebRequest.class.php

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

7777
// GET parameters
78-
$this->getParameters = get_magic_quotes_gpc() ? sfToolkit::stripslashesDeep($_GET) : $_GET;
78+
if (version_compare(PHP_VERSION, '5.4.0-dev', '<') && get_magic_quotes_gpc())
79+
{
80+
$this->getParameters = sfToolkit::stripslashesDeep($_GET);
81+
}
82+
else
83+
{
84+
$this->getParameters = $_GET;
85+
}
7986
$this->parameterHolder->add($this->getParameters);
8087

8188
$postParameters = $_POST;

0 commit comments

Comments
 (0)