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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Pull Requests

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: Sat Dec 21 12:01:31 2024 UTC