Correct SqlResultProvider::fetchField() to work with empty results.
This commit is contained in:
@ -76,7 +76,11 @@ class SqlResultProvider
|
|||||||
*/
|
*/
|
||||||
public function fetchField($field)
|
public function fetchField($field)
|
||||||
{
|
{
|
||||||
return current($this->result_items)->{$field};
|
$item = current($this->result_items);
|
||||||
|
if ($item) {
|
||||||
|
return $item->{$field};
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch()
|
public function fetch()
|
||||||
|
Reference in New Issue
Block a user