From 4abe16e201e595db5d1efc48ca3089631f8a1bef Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Mon, 24 Oct 2005 10:24:28 +0000 Subject: [PATCH] If _bUsePearError is set, return the PEAR error from the update. --- lib/ktentity.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ktentity.inc b/lib/ktentity.inc index f1c8958..772b4a7 100644 --- a/lib/ktentity.inc +++ b/lib/ktentity.inc @@ -65,8 +65,11 @@ class KTEntity { if ($this->iId > 0) { $res = DBUtil::autoUpdate($this->_table(), $this->_fieldValues(), $this->iId); if (PEAR::isError($res)) { - $_SESSION['errorMessage'] = $res->toString(); - return false; + if ($this->_bUsePearError === false) { + $_SESSION['errorMessage'] = $res->toString(); + return false; + } + return $res; } return true; } -- libgit2 0.21.4