php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #250 gpc - mixing arrays and scalars
Submitted: 1998-04-06 12:13 UTC Modified: 1998-04-18 10:57 UTC
From: koles at atrey dot karlin dot mff dot cuni dot cz Assigned: rasmus (profile)
Status: Closed Package: Parser error
PHP Version: 3.0 Release Candidate 2 OS: Linux 2.0.33 (RH5)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: koles at atrey dot karlin dot mff dot cuni dot cz
New email:
PHP Version: OS:

 

 [1998-04-06 12:13 UTC] koles at atrey dot karlin dot mff dot cuni dot cz
It seems if GPC_order is set to CGP and get-variable
is a scalar but post-variable is an array then final 
value will be an empty array.

For example if test.php3 is

<?php echo "a = $a, count = " . count($a) ?>

then result of form   

<FORM ACTION="test.php3a=blah" METHOD="post">
<INPUT TYPE="hidden" NAME="a[]" VALUE="1">
<INPUT TYPE="hidden" NAME="a[]" VALUE="2">
<INPUT TYPE="submit">
</FORM>

is "a = Array, count = 0" instead of "a = Array, count = 2".

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-18 10:57 UTC] rasmus
Tricky one, but it is fixed now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 20:01:28 2024 UTC