Commit a22e7a07903b4d945a133d3cdb8a97a5fd11d197
1 parent
11e48917
Merged in from DEV trunk...
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/STABLE/trunk@8149 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 | ... | ... |