Skip to content

Commit

Permalink
Avoid notice if result is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 22, 2014
1 parent 1879e71 commit a9f4fad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions framework/Db/lib/Horde/Db/Adapter/Oracle/Result.php
Expand Up @@ -10,6 +10,7 @@
*/

/**
* @since Horde_Db 2.1.0
* @author Jan Schneider <jan@horde.org>
* @license http://www.horde.org/licenses/bsd
* @category Horde
Expand Down Expand Up @@ -37,13 +38,11 @@ class Horde_Db_Adapter_Oracle_Result extends Horde_Db_Adapter_Base_Result
*/
protected function _fetchArray()
{
return array_change_key_case(
oci_fetch_array(
$this->_result,
$this->_map[$this->_fetchMode]
),
CASE_LOWER
);
$array = oci_fetch_array($this->_result, $this->_map[$this->_fetchMode]);
if ($array) {
$array = array_change_key_case($array, CASE_LOWER);
}
return $array;
}

/**
Expand Down

0 comments on commit a9f4fad

Please sign in to comment.