Skip to content

Conversation

@MichaelBelgium
Copy link

Closes #46

Stumbled on the same issue so might aswel try to fix it.

It was odd I have to do

$response = $this->graph->createCollectionRequest("GET", $endpoint)
                        ->setReturnType(User::class)
                        ->execute();

if(!is_array($users)) {

}

and not

$response = $this->graph->createCollectionRequest("GET", $endpoint)
                        ->setReturnType(User::class)
                        ->execute();

if(count($response) == 0) {}
//or
if(empty($response)) {}

@msftclas
Copy link

msftclas commented Oct 4, 2018

CLA assistant check
All CLA requirements met.

@MIchaelMainer
Copy link
Collaborator

MIchaelMainer commented Oct 18, 2018

Your change makes sense. We can't take it at this time as it would break folks. I will leave this PR open so that we can take this when the time comes for us to break things.

Thank you very much for putting in your effort and time into this PR!

908760

@guilliamxavier
Copy link
Contributor

guilliamxavier commented Jan 20, 2020

@MIchaelMainer: #260 would fix the bug without breaking existing code, could you please give it a look?
Edit: I just required a review directly on the PR (didn't know about that GitHub functionality)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requesting an empty collection returns an object of the return type

4 participants