Commit edcdf33591f31185e793a03846eb2634ef202e16
1 parent
19dc32ab
Check for an error as last result in fetchRow.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3038 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
lib/database/dbcompat.inc
| @@ -21,6 +21,9 @@ class DBCompat { | @@ -21,6 +21,9 @@ class DBCompat { | ||
| 21 | if (is_int($this->lastResult)) { | 21 | if (is_int($this->lastResult)) { |
| 22 | return; | 22 | return; |
| 23 | } | 23 | } |
| 24 | + if (PEAR::isError($this->lastResult)) { | ||
| 25 | + return false; | ||
| 26 | + } | ||
| 24 | $this->lastRow = $this->lastResult->fetchRow(DB_FETCHMODE_ASSOC); | 27 | $this->lastRow = $this->lastResult->fetchRow(DB_FETCHMODE_ASSOC); |
| 25 | return $this->lastRow; | 28 | return $this->lastRow; |
| 26 | } | 29 | } |