Commit e90557223e8b55779bd4f9d47b32d208e539edb3

Authored by nbm
1 parent 1a6d23fa

If _bUsePearError is set, return the PEAR error from the update.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3871 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 2 deletions
lib/ktentity.inc
@@ -65,8 +65,11 @@ class KTEntity { @@ -65,8 +65,11 @@ class KTEntity {
65 if ($this->iId > 0) { 65 if ($this->iId > 0) {
66 $res = DBUtil::autoUpdate($this->_table(), $this->_fieldValues(), $this->iId); 66 $res = DBUtil::autoUpdate($this->_table(), $this->_fieldValues(), $this->iId);
67 if (PEAR::isError($res)) { 67 if (PEAR::isError($res)) {
68 - $_SESSION['errorMessage'] = $res->toString();  
69 - return false; 68 + if ($this->_bUsePearError === false) {
  69 + $_SESSION['errorMessage'] = $res->toString();
  70 + return false;
  71 + }
  72 + return $res;
70 } 73 }
71 return true; 74 return true;
72 } 75 }