Commit 4abe16e201e595db5d1efc48ca3089631f8a1bef
1 parent
6a451440
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 | 65 | if ($this->iId > 0) { |
| 66 | 66 | $res = DBUtil::autoUpdate($this->_table(), $this->_fieldValues(), $this->iId); |
| 67 | 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 | 74 | return true; |
| 72 | 75 | } | ... | ... |