CodeIgniter 2.1.1 버전으로 Oracle에서 작업시 아래와 같은 오류가 나옵니다.
Severity: Notice
Message: Undefined variable: rowcount
Filename: oci8/oci8_result.php
Line Number: XX
원인은 oci8_result.php 버그입니다.
수정 파일 system/database/drivers/oci8/oci8_result.php
public function num_rows()
{
if ($this->num_rows === 0 && count($this->result_array()) > 0)
{
$this->num_rows = count($this->result_array());
@oci_execute($this->stmt_id);
if ($this->curs_id)
{
@oci_execute($this->curs_id);
}
}
return $rowcount;
}
위와 같은 코드가 있습니다.
여기서 return $rowcount; 을
return $this->num_rows; 으로 바꿔 주세요.
해당 함수 내에 정의되지 않은 $rowcount 변수를 리턴해서 발생하는 버그입니다.