Browse Source

Correct SqlResultProvider::fetchField() to work with empty results.

namespace
Alexander Demidov 11 years ago
parent
commit
94addf4ca9
  1. 6
      model/SqlResultProvider.php

6
model/SqlResultProvider.php

@ -76,7 +76,11 @@ class SqlResultProvider
*/
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()

Loading…
Cancel
Save