Commit 72434c70588cce2dbdb78c3e4e0b86cdc76f3e57
1 parent
d8b3e80c
KTS-1856
"Saving metadata can cause warnings that corrupt webservice output" Fixed. Reviewed By: Jalaloedien Abrahams git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6452 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
lib/documentmanagement/documentutil.inc.php
| @@ -301,8 +301,8 @@ class KTDocumentUtil { | @@ -301,8 +301,8 @@ class KTDocumentUtil { | ||
| 301 | if (PEAR::isError($res)) { | 301 | if (PEAR::isError($res)) { |
| 302 | return $res; | 302 | return $res; |
| 303 | } | 303 | } |
| 304 | - $aMetadata = $res; | ||
| 305 | - | 304 | + $aMetadata = empty($res)?array():$res; |
| 305 | + | ||
| 306 | $iMetadataVersionId = $oDocument->getMetadataVersionId(); | 306 | $iMetadataVersionId = $oDocument->getMetadataVersionId(); |
| 307 | $res = DBUtil::runQuery(array("DELETE FROM $table WHERE metadata_version_id = ?", array($iMetadataVersionId))); | 307 | $res = DBUtil::runQuery(array("DELETE FROM $table WHERE metadata_version_id = ?", array($iMetadataVersionId))); |
| 308 | if (PEAR::isError($res)) { | 308 | if (PEAR::isError($res)) { |