Commit 9923924b57c75109d1fbf63c35178c5b7d0ab1d9
1 parent
53fb2aaf
KTS-3083
"Import from Server Location, you get a Fatal Error" Fixed. Added more document object error checking. Committed By: Kevin Fourie Reviewed By: Jonnathan Byrne git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8148 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/documentmanagement/documentutil.inc.php
| ... | ... | @@ -259,7 +259,9 @@ class KTDocumentUtil { |
| 259 | 259 | $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt('Storing contents'))); |
| 260 | 260 | $res = KTDocumentUtil::storeContents($oDocument, '', $aOptions); |
| 261 | 261 | if (PEAR::isError($res)) { |
| 262 | - $oDocument->delete(); | |
| 262 | + if (!PEAR::isError($oDocument)) { | |
| 263 | + $oDocument->delete(); | |
| 264 | + } | |
| 263 | 265 | return $res; |
| 264 | 266 | } |
| 265 | 267 | ... | ... |