Welcome Guest, Not a member yet? Register   Sign In
$query->row() returns array ALWAYS
#4

[eluser]WanWizard[/eluser]
No, the result_object() method should return an object, not an array. So this is a bug.

You could debate if either an array or object should be returned if you request something that doesn't exist.
I would prefer FALSE, to make it easier to test the result of a $query->row() call. Now it returns an array, and you have to test if it's empty to avoid errors about missing array elements (or in your case, getting an array back instead of an object).


Messages In This Thread
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:31 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:49 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:51 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB