Closed anoxic closed 9 years ago
This change was introduced by 2a3dd78. I've made some changes to remedy this situation:
Result::seek
strictly returns true or false, without throwing any exceptions. Furthermore, to closely follow mysqli, calls to the Result::fetch
method -- indirectly through Result::first
and Result::last
-- return null
(instead of false
as you proposed) if you try to fetch from an empty result set.
I just noticed this wasn't closed yet. Thank you, this works well!
Hello, I am getting the following error when trying to use $dabble->first() on an empty query.
And the trace
It's simple enough to get around by getting the count first, but I think another response may be more appropriate than an exception within dabbles' calls. I would lean towards returning false, but there are certainly other options.