ENHANCEMENT: Remove unnecessary NULL check.

This commit is contained in:
Dominik Beerbohm 2012-04-30 13:44:31 +03:00
parent 0e8c3acc35
commit fdd5e71ba9

View File

@ -1160,16 +1160,8 @@ class MySQLQuery extends SS_Query {
}
public function nextRecord() {
if(is_object($this->handle) && $data = $this->handle->fetch_row()) {
$output = array();
$this->handle->field_seek(0);
while($field = $this->handle->fetch_field()) {
$columnName = $field->name;
if(isset($data[$this->handle->current_field-1]) || !isset($output[$columnName])) {
$output[$columnName] = $data[$this->handle->current_field-1];
}
}
return $output;
if(is_object($this->handle) && ($data = $this->handle->fetch_assoc())) {
return $data;
} else {
return false;
}