Commit 10d862eb9afeb20f59d7564a821321cf33827824
1 parent
88a13d32
Pass on the error from _add.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3664 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
lib/documentmanagement/documentutil.inc.php
| @@ -320,6 +320,9 @@ class KTDocumentUtil { | @@ -320,6 +320,9 @@ class KTDocumentUtil { | ||
| 320 | return PEAR::raiseError("File already exists"); | 320 | return PEAR::raiseError("File already exists"); |
| 321 | } | 321 | } |
| 322 | $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions); | 322 | $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions); |
| 323 | + if (PEAR::isError($oDocument)) { | ||
| 324 | + return $oDocument; | ||
| 325 | + } | ||
| 323 | 326 | ||
| 324 | //create the web document link | 327 | //create the web document link |
| 325 | $oWebDocument = & new WebDocument($oDocument->getID(), -1, 1, NOT_PUBLISHED, getCurrentDateTime()); | 328 | $oWebDocument = & new WebDocument($oDocument->getID(), -1, 1, NOT_PUBLISHED, getCurrentDateTime()); |