Issue 1634:change to return empty array() from return null on returned data of query result.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10386 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2012-03-08 05:36:36 +00:00
parent ac56406b22
commit 41e828e8b5
3 changed files with 6 additions and 4 deletions

View file

@ -147,7 +147,8 @@
* @brief Fetch results
**/
function _fetch($result, $arrayIndexEndValue = NULL) {
if(!$this->isConnected() || $this->isError() || !$result) return;
$output = array();
if(!$this->isConnected() || $this->isError() || !$result) return $output;
while($tmp = $this->db_fetch_object($result)) {
if($arrayIndexEndValue) $output[$arrayIndexEndValue--] = $tmp;
else $output[] = $tmp;