|  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
 [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">

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


Add a Patch

Pull Requests

Add a Pull Request


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: Mon Jul 15 15:01:29 2024 UTC