|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-06-16 11:31 UTC] z at orbus dot fr
Description:
------------
When you send a multidimensional array to fetch method, it will fail to convert it as a string to send to the server.
Reproduce code:
---------------
$oauth->fetch($api_url, array('one' => array('two' => array('three'))), OAUTH_HTTP_METHOD_POST);
Expected result:
----------------
Server should receive:
one[two][]=three
Actual result:
--------------
Server is receiving:
one=Array
And there's a 'Notice: Array to string conversion' in client code.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
Multi-dimensional arrays should be passed as: array('arr[]' => array(1,2,3)) Produces: arr[]=1&arr[]=2&arr[]=3I'm just expecting that OAuth::fetch will behave like other PHP functions, eg. http_build_query is doing the right thing: $array = array('one' => array('two' => array('three'))); echo http_build_query($array, null, '&'); // Outputs: one[two][0]=three