Commit 57b2db94eec6a6584440fde16d66437243abbd98

Authored by kevin_fourie
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
lib/documentmanagement/documentutil.inc.php
@@ -695,6 +695,10 @@ class KTDocumentUtil { @@ -695,6 +695,10 @@ class KTDocumentUtil {
695 if (is_null($aOptions)) { 695 if (is_null($aOptions)) {
696 $aOptions = array(); 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 $bCanMove = KTUtil::arrayGet($aOptions, 'move'); 702 $bCanMove = KTUtil::arrayGet($aOptions, 'move');
699 $oStorage =& KTStorageManagerUtil::getSingleton(); 703 $oStorage =& KTStorageManagerUtil::getSingleton();
700 704