Commit 2fbae5c3369f57e17079e5ad1248f4953c7a67ee

Authored by nbm
1 parent a1343435

If _bUsePearError is set, return a PEAR error instead of false.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3860 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 6 additions and 2 deletions
lib/ktentity.inc
... ... @@ -84,8 +84,12 @@ class KTEntity {
84 84 if ($this->iId >= 0) {
85 85 $res = DBUtil::autoDelete($this->_table(), $this->iId);
86 86 if (PEAR::isError($res)) {
87   - $_SESSION['errorMessage'] = $res->toString();
88   - return false;
  87 + if ($this->_bUsePearError === false) {
  88 + $_SESSION['errorMessage'] = $res->toString();
  89 + return false;
  90 + } else {
  91 + return $res;
  92 + }
89 93 }
90 94 return true;
91 95 }
... ...