dml-sqlsrv MDL-26025 Removed use of property to track rownumber field in favor of always unsetting it
This commit is contained in:
@@ -32,7 +32,6 @@ class sqlsrv_native_moodle_recordset extends moodle_recordset {
|
||||
|
||||
protected $rsrc;
|
||||
protected $current;
|
||||
protected $hasrownumber = null;
|
||||
|
||||
public function __construct($rsrc) {
|
||||
$this->rsrc = $rsrc;
|
||||
@@ -45,12 +44,7 @@ class sqlsrv_native_moodle_recordset extends moodle_recordset {
|
||||
|
||||
private function fetch_next() {
|
||||
if ($row = sqlsrv_fetch_array($this->rsrc, SQLSRV_FETCH_ASSOC)) {
|
||||
if ($this->hasrownumber === null) {
|
||||
$this->hasrownumber = array_key_exists('sqlsrvrownumber', $row);
|
||||
}
|
||||
if ($this->hasrownumber) {
|
||||
unset($row['sqlsrvrownumber']);
|
||||
}
|
||||
unset($row['sqlsrvrownumber']);
|
||||
$row = array_change_key_case($row, CASE_LOWER);
|
||||
}
|
||||
return $row;
|
||||
|
||||
Reference in New Issue
Block a user