Oci8 Driver generating "Fetch out of sequence warning" #3958

Closed
wants to merge 1 commit into
from
+2 −5
Split
@@ -145,14 +145,11 @@ public function current()
*/
protected function loadData()
{
- $this->currentComplete = false;
- $this->currentData = null;
-
+ $this->currentComplete = true;
$this->currentData = oci_fetch_assoc($this->resource);
if ($this->currentData !== false) {
$this->position++;
- $this->currentComplete = true;
return true;
}
return false;
@@ -192,7 +189,7 @@ public function rewind()
public function valid()
{
if ($this->currentComplete) {
- return true;
+ return ($this->currentData !== false);
}
return $this->loadData();