1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 06:07:39 +02:00
This commit is contained in:
David Grudl
2007-05-17 21:02:26 +00:00
parent 7452065de0
commit 89a7c8ac73
2 changed files with 6 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
* *
* Copyright (c) 2005-2007 David Grudl aka -dgx- <dave@dgx.cz> * Copyright (c) 2005-2007 David Grudl aka -dgx- <dave@dgx.cz>
* *
* @version $Revision: 43 $ $Date: 2007-05-12 00:25:32 +0200 (so, 12 V 2007) $ * @version $Revision$ $Date$
* @package dibi * @package dibi
*/ */
@@ -123,7 +123,10 @@ class DibiMSSqlDriver extends DibiDriver
public function errorInfo() public function errorInfo()
{ {
return FALSE; return array(
'message' => NULL,
'code' => NULL,
);
} }

View File

@@ -246,6 +246,7 @@ abstract class DibiResult implements IteratorAggregate, Countable
{ {
@$this->seek(0); @$this->seek(0);
$rec = $this->fetch(); $rec = $this->fetch();
if (!$rec) return array(); // empty resultset
if ($value === NULL) { if ($value === NULL) {
$tmp = array_keys($rec); $tmp = array_keys($rec);
@@ -256,8 +257,6 @@ abstract class DibiResult implements IteratorAggregate, Countable
if (!array_key_exists($value, $rec)) return FALSE; if (!array_key_exists($value, $rec)) return FALSE;
} }
if (!$rec) return array(); // empty resultset
$arr = array(); $arr = array();
do { do {
$arr[ $rec[$key] ] = $rec[$value]; $arr[ $rec[$key] ] = $rec[$value];