Commit 57b2db94eec6a6584440fde16d66437243abbd98
1 parent
fb21e549
KTS-3083
"Import from Server Location, you get a Fatal Error" Fixed. Added 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@8137 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
0 deletions
lib/documentmanagement/documentutil.inc.php
| ... | ... | @@ -695,6 +695,10 @@ class KTDocumentUtil { |
| 695 | 695 | if (is_null($aOptions)) { |
| 696 | 696 | $aOptions = array(); |
| 697 | 697 | } |
| 698 | + if (PEAR::isError($oDocument)) { | |
| 699 | + return PEAR::raiseError(sprintf(_kt("Couldn't store contents: %s"), $oDocument->getMessage())); | |
| 700 | + } | |
| 701 | + | |
| 698 | 702 | $bCanMove = KTUtil::arrayGet($aOptions, 'move'); |
| 699 | 703 | $oStorage =& KTStorageManagerUtil::getSingleton(); |
| 700 | 704 | ... | ... |