Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unpack array with string keys #665

Closed
SOHELAHMED7 opened this issue Oct 2, 2021 · 0 comments
Closed

Cannot unpack array with string keys #665

SOHELAHMED7 opened this issue Oct 2, 2021 · 0 comments

Comments

@SOHELAHMED7
Copy link
Contributor

SOHELAHMED7 commented Oct 2, 2021

Meta:
This is not an issue but part of docs which I would like to add


3rd arg in fetch() of \Gitlab\ResultPager should be array. Yes, but again that array should be wrapped in array to get rid of error as in title.

Why that error was produced is explained here very well

Example:

Wrong

$pager = new \Gitlab\ResultPager($client);
                $response = $pager->fetch($client->projects(), 'all',
                    ['owned' => true]
                );

Right

$pager = new \Gitlab\ResultPager($client);
                $response = $pager->fetch($client->projects(), 'all',
                    [['owned' => true]]
                );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant