#34594 [Bgs->Csd]: [Solved] Arrays from form get send over as string instead of array
ID: 34594 User updated by: thijs at toltech dot nl -Summary: Arrays from form get send over as string instead of array Reported By: thijs at toltech dot nl -Status: Bogus +Status: Closed Bug Type: Variables related Operating System: Gentoo Linux PHP Version: 5.0.5 New Comment: Ok I found the problem, Every variable that is send over (GET and POST) variables is being checked: foreach($_POST as $key => $value) $_POST[$key] = addslashes(trim($value)); This somehow caused it to be a string with the value 'Array'. I searched around for help and found one similair bug on this site that was exactly the same.. so I thought it was a php bug. Sorry for this invalid bug post.. I closed it now Previous Comments: [2005-09-22 12:50:08] thijs at toltech dot nl I have been testing this now as well since [EMAIL PROTECTED] sais this works.. it now works for me as well except in the form where I want it to work.. I first thought this was caused by the template engine, but it isn't.. I will try to find out what is causing this.. [2005-09-22 12:31:35] [EMAIL PROTECTED] Works fine for me too when using proper HTML form. [2005-09-22 12:27:24] thijs at toltech dot nl I'm unable to post feedback on this matter due to that make install fails on the location of the apache conf file. (Which is httpd.conf instead of apache2.conf, I configured php with the configuration taken from phpinfo() from my current php installation) [2005-09-22 11:11:03] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Works perfectly here. [2005-09-22 11:01:52] thijs at toltech dot nl Description: By using form you can send Arrays over to the next page with the name="var_name[]" method. However, doing this will result in that the $_POST['var_name'] will contain the string 'Array' all the time, no matter what is really send in. (Note: this also happend to me in php5.1.0-b3, gentoo forced me to downgrade but I think it is also in php5.1.0-rc1, would be glad if anyone can check this for me) Reproduce code: --- All Red Blue Green Orange Yellow and on the next page in php code: Expected result: The expected result is (assuming you selected 'Green' and 'Red': Array ( [color] = Array ( [0] = red [1] = green ) ) Actual result: -- while will produce (no matter what you select): Array ( [color] = Array ) -- Edit this bug report at http://bugs.php.net/?id=34594&edit=1
#34594 [Bgs]: Arrays from form get send over as string instead of array
ID: 34594 User updated by: thijs at toltech dot nl Reported By: thijs at toltech dot nl Status: Bogus Bug Type: Variables related Operating System: Gentoo Linux PHP Version: 5.0.5 New Comment: I have been testing this now as well since [EMAIL PROTECTED] sais this works.. it now works for me as well except in the form where I want it to work.. I first thought this was caused by the template engine, but it isn't.. I will try to find out what is causing this.. Previous Comments: [2005-09-22 12:31:35] [EMAIL PROTECTED] Works fine for me too when using proper HTML form. [2005-09-22 12:27:24] thijs at toltech dot nl I'm unable to post feedback on this matter due to that make install fails on the location of the apache conf file. (Which is httpd.conf instead of apache2.conf, I configured php with the configuration taken from phpinfo() from my current php installation) [2005-09-22 11:11:03] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Works perfectly here. [2005-09-22 11:01:52] thijs at toltech dot nl Description: By using form you can send Arrays over to the next page with the name="var_name[]" method. However, doing this will result in that the $_POST['var_name'] will contain the string 'Array' all the time, no matter what is really send in. (Note: this also happend to me in php5.1.0-b3, gentoo forced me to downgrade but I think it is also in php5.1.0-rc1, would be glad if anyone can check this for me) Reproduce code: --- All Red Blue Green Orange Yellow and on the next page in php code: Expected result: The expected result is (assuming you selected 'Green' and 'Red': Array ( [color] = Array ( [0] = red [1] = green ) ) Actual result: -- while will produce (no matter what you select): Array ( [color] = Array ) -- Edit this bug report at http://bugs.php.net/?id=34594&edit=1
#34594 [Fbk->Opn]: Arrays from form get send over as string instead of array
ID: 34594 User updated by: thijs at toltech dot nl Reported By: thijs at toltech dot nl -Status: Feedback +Status: Open Bug Type: Variables related Operating System: Gentoo Linux PHP Version: 5.0.5 New Comment: I'm unable to post feedback on this matter due to that make install fails on the location of the apache conf file. (Which is httpd.conf instead of apache2.conf, I configured php with the configuration taken from phpinfo() from my current php installation) Previous Comments: [2005-09-22 11:11:03] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Works perfectly here. [2005-09-22 11:01:52] thijs at toltech dot nl Description: By using form you can send Arrays over to the next page with the name="var_name[]" method. However, doing this will result in that the $_POST['var_name'] will contain the string 'Array' all the time, no matter what is really send in. (Note: this also happend to me in php5.1.0-b3, gentoo forced me to downgrade but I think it is also in php5.1.0-rc1, would be glad if anyone can check this for me) Reproduce code: --- All Red Blue Green Orange Yellow and on the next page in php code: Expected result: The expected result is (assuming you selected 'Green' and 'Red': Array ( [color] = Array ( [0] = red [1] = green ) ) Actual result: -- while will produce (no matter what you select): Array ( [color] = Array ) -- Edit this bug report at http://bugs.php.net/?id=34594&edit=1
#34594 [NEW]: Arrays from form get send over as string instead of array
From: thijs at toltech dot nl Operating system: Gentoo Linux PHP version: 5.0.5 PHP Bug Type: Variables related Bug description: Arrays from form get send over as string instead of array Description: By using form you can send Arrays over to the next page with the name="var_name[]" method. However, doing this will result in that the $_POST['var_name'] will contain the string 'Array' all the time, no matter what is really send in. (Note: this also happend to me in php5.1.0-b3, gentoo forced me to downgrade but I think it is also in php5.1.0-rc1, would be glad if anyone can check this for me) Reproduce code: --- All Red Blue Green Orange Yellow and on the next page in php code: Expected result: The expected result is (assuming you selected 'Green' and 'Red': Array ( [color] = Array ( [0] = red [1] = green ) ) Actual result: -- while will produce (no matter what you select): Array ( [color] = Array ) -- Edit bug report at http://bugs.php.net/?id=34594&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34594&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34594&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34594&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34594&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34594&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34594&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34594&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34594&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34594&r=support Expected behavior: http://bugs.php.net/fix.php?id=34594&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34594&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34594&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34594&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34594&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34594&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34594&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34594&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34594&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34594&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34594&r=mysqlcfg