mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: Remove unnecessary NULL check.
This commit is contained in:
parent
0e8c3acc35
commit
fdd5e71ba9
@ -1160,16 +1160,8 @@ class MySQLQuery extends SS_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function nextRecord() {
|
public function nextRecord() {
|
||||||
if(is_object($this->handle) && $data = $this->handle->fetch_row()) {
|
if(is_object($this->handle) && ($data = $this->handle->fetch_assoc())) {
|
||||||
$output = array();
|
return $data;
|
||||||
$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;
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user