MDL-52544 oracle: Apply upstream pull request to AdoDB oracle driver
[moodle.git] / lib / adodb / drivers / adodb-oci8po.inc.php
index 7c6049b..15e89fb 100644 (file)
@@ -138,8 +138,10 @@ class ADORecordset_oci8po extends ADORecordset_oci8 {
        // 10% speedup to move MoveNext to child class
        function MoveNext()
        {
-               if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+               $ret = @oci_fetch_array($this->_queryID,$this->fetchMode);
+               if($ret !== false) {
                global $ADODB_ANSI_PADDING_OFF;
+                       $this->fields = $ret;
                        $this->_currentRow++;
                        $this->_updatefields();
 
@@ -169,10 +171,12 @@ class ADORecordset_oci8po extends ADORecordset_oci8 {
                                $arr = array();
                                return $arr;
                        }
-               if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+               $ret = @oci_fetch_array($this->_queryID,$this->fetchMode);
+               if ($ret === false) {
                        $arr = array();
                        return $arr;
                }
+               $this->fields = $ret;
                $this->_updatefields();
                $results = array();
                $cnt = 0;
@@ -188,8 +192,9 @@ class ADORecordset_oci8po extends ADORecordset_oci8 {
        {
                global $ADODB_ANSI_PADDING_OFF;
 
-               $ret = @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
+               $ret = @oci_fetch_array($this->_queryID,$this->fetchMode);
                if ($ret) {
+                       $this->fields = $ret;
                        $this->_updatefields();
 
                        if (!empty($ADODB_ANSI_PADDING_OFF)) {
@@ -198,7 +203,7 @@ class ADORecordset_oci8po extends ADORecordset_oci8 {
                                }
                        }
                }
-               return $ret;
+               return $ret !== false;
        }
 
 }