note 99464 deleted from function.get-magic-quotes-gpc by danbrown

From: Date: Wed, 18 Aug 2010 23:26:38 +0000
Subject: note 99464 deleted from function.get-magic-quotes-gpc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-171830@lists.php.net to get a copy of this message
Note Submitter: Alix Axel ---- There is a small issue with the code I submitted previously, the fixed version is now shipped with the phunction PHP Framework (http://phunction.sf.net/) and goes as follows: <?php if ((get_magic_quotes_gpc() === 1) && (version_compare(PHP_VERSION, '5.3.0', '>=') === true)) { $_GET = json_decode(stripslashes(json_encode($_GET, JSON_HEX_APOS | JSON_HEX_QUOT)), true); $_POST = json_decode(stripslashes(json_encode($_POST, JSON_HEX_APOS | JSON_HEX_QUOT)), true); $_COOKIE = json_decode(stripslashes(json_encode($_COOKIE, JSON_HEX_APOS | JSON_HEX_QUOT)), true); $_REQUEST = json_decode(stripslashes(json_encode($_REQUEST, JSON_HEX_APOS | JSON_HEX_QUOT)), true); } ?>

« previous php.notes (#171830) next »