Ticket #393 (closed Bug: fixed)
ORM $query->count() fails if no rows returned
| Reported by: | joeles | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | major | Milestone: | 2.1.2 |
| Component: | Libraries:ORM | Version: | SVN HEAD |
| Keywords: | ORM count result find_all | Cc: |
Description
The following works fine as long there are rows returned, but gives me a "Call to a member function count() on a non-object" fatal error when there are not.
$user = new User_Model;
$query = $user->find_all_by_location('Houston');
echo $query->count();
For some reason, count($query) does work, however.
Change History
Note: See
TracTickets for help on using
tickets.
