-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Making sure that fetch returns false if nothing is found #2500
Conversation
@@ -242,7 +242,7 @@ public function fetch($fetchMode = null) | |||
{ | |||
$values = $this->_fetch(); | |||
if (null === $values) { | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when a null
is actually retrieved? Is it supposed to always retrieve an array
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I understand your question.
It's supposed to return false or an array (boolean|array).
Now that I think about it, _fetch is not even supposed to return null in the first place, so that should be fixed as well I suppose.
@PatrickLouys merged, thanks! |
added test to make sure that fetch returns false if nothing is found
fixed mysqli
Resolves #2497