#42686 [Opn->Fbk]: magic_quotes_gpc() does not respect data type
ID: 42686
Updated by: jani@php.net
-Summary: magic_quotes_gpc dose not pay respect to data type
Reported By: buganini at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Windows 2003
PHP Version: 5.2.4
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2007-09-17 11:00:31] buganini at gmail dot com
Description:
------------
Under Windows 2003 IIS 6,
I had a list of
<input type="text" name="blah[]" />
and I had
var_dump($_POST['blah']);
in the action page
I got:
string(5) "Array"
!@#$%^&*
================
After I turned magic_quotes_gpc to off,
I got what I want:
array(2) {
[0]=>
string(4) "blah"
[1]=>
string(4) "bluh"
}
I thought it is because magic_quotes_gpc forget to consider data type
while adding slashes.
//This problem dosen't exist under FreeBSD
Reproduce code:
---------------
<input type="text" name="blah[]" />
<input type="text" name="blah[]" />
var_dump($_POST['blah']);
Expected result:
----------------
array(2) {
[0]=>
string(4) "blah"
[1]=>
string(4) "bluh"
}
Actual result:
--------------
string(5) "Array"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42686&edit=1
Thread (3 messages)