|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-14 12:24 UTC] jdespatis at yahoo dot fr
[2012-09-23 16:31 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: nikic
[2012-09-23 16:31 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 21:00:01 2025 UTC |
Description: ------------ parse_str() always quotes arguments when magic_quotes_gpc is active on startup (php.ini or .htaccess configured). But seems I cannot SWITCH OFF magic_quotes_gpc on runtime FOR parse_str(). (I understand that it is useless to try to switch off magic_quotes_gpc for purposes other than parse_str!). Seems it's a restriction of ini_set(), not parse_str() itself. Reproduce code: --------------- <?php # magic_quotes_gpc MUST be ON in .htaccess or php.ini! $qs = 'a="b"'; ini_set("magic_quotes_gpc", 0); parse_str($qs, $p); echo "<pre>".print_r($p, 1)."</pre>"; ?> Expected result: ---------------- Array ( [a] => "b" ) Actual result: -------------- Array ( [a] => \"b\" )