Skip to content

Conversation

@zolotarev-om
Copy link

there is a bug when you create a url from a multidimensional 'paramArray'

url path without fix (and in this case the query does not work correctly)

/issue/TEST-11157?fields%5B0%5D=-attachment&fields%5B1%5D=-comment&expand%5B0%5D=changelog

url path with fix (all correctly)

/issue/RR-11157?fields=-attachment&fields=-comment&expand=changelog

@lesstif
Copy link
Owner

lesstif commented Apr 21, 2017

I was already tested multidimensional array param and it works. (see below example code)

would you show me your code please?

thanks.

$issueService = new IssueService();

$queryParam = [
        'fields' => [  // default: '*all'
            'summary',
            'attachment',
            'comment',
        ],
        'expand' => [
            'changelog',
            'names',
            'schema',
        ]
    ];
        
$issue = $issueService->get('TEST-11157', $queryParam);

var_dump($issue->fields);

@zolotarev-om
Copy link
Author

zolotarev-om commented Apr 21, 2017

it seems to be working(no exception/warning/etc), but not display requested(!) params

in this queryParam example
[ 'fields' => [ '-attachment', '-comment' ], 'expand' => [ 'changelog' ] ]
result not contained changelog and not hide attachment and comment (result contains some default fields)

ps: at least reproduced on latest php7.0.*

@lesstif lesstif closed this in 49e2477 Apr 21, 2017
@lesstif
Copy link
Owner

lesstif commented Apr 21, 2017

@zolotarev-om your are correct. thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants