problem with numeric POST variables

35 views
Skip to first unread message

Bobo Wieland

unread,
Jul 10, 2014, 8:06:27 AM7/10/14
to guz...@googlegroups.com
I don't know if the RFC 3986 forbids it or something, but if not there is a problem with Guzzle\Http\QueryString
 (in Guzzlie 3.9)

The method prepareData uses array_merge in:

$temp = array_merge($temp, $this->aggregator->aggregate($key, $value, $this));

If $temp has any keys with only digits these will get re-indexed starting from 0.

This is our testdata:

array(4) {
    [89]=>
    array(2) {
      ["from"]=>
      string(2) "45"
      ["to"]=>
      string(2) "54"
    }
    [1457]=>
    array(2) {
      ["from"]=>
      string(1) "0"
      ["to"]=>
      string(3) "140"
    }
    [8800]=>
    string(5) "false"
    ["price"]=>
    array(2) {
      ["from"]=>
      string(4) "5000"
      ["to"]=>
      string(5) "10000"
    }
  }


$temp will hold "8800" => "false" until price gets evaluated. price will trigger the array_merge and 8800 will get re-indexed to 0. The first two numeric keys will work, since they get a special treatment beeing arrays.



Reply all
Reply to author
Forward
0 new messages