You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI_DB_result::row() is supposed to return an stdClass object encapsulating a single row from the query result. When there are no rows in the result, row() returns an empty array instead, which is very unexpected for a method that's supposed to return an object — expected behavior would be to return null.
I've tracked this to line 255 in system/database/DB_result.php, in the row_object() method:
{{{
!php
if (count($result) == 0)
{
return $result;
}
}}}
Edit: this apparently applies to all row-fetching methods as well (first_row(), last_row(), next_row(), previous_row()).
The text was updated successfully, but these errors were encountered:
CI_DB_result::row() is supposed to return an stdClass object encapsulating a single row from the query result. When there are no rows in the result, row() returns an empty array instead, which is very unexpected for a method that's supposed to return an object — expected behavior would be to return null.
I've tracked this to line 255 in system/database/DB_result.php, in the row_object() method:
{{{
!php
if (count($result) == 0)
{
return $result;
}
}}}
Edit: this apparently applies to all row-fetching methods as well (first_row(), last_row(), next_row(), previous_row()).
The text was updated successfully, but these errors were encountered: