From 524a307c78d97beace36387244d8cb03a6de4897 Mon Sep 17 00:00:00 2001 From: conradverm Date: Wed, 1 Aug 2007 08:24:53 +0000 Subject: [PATCH] WSA-9 "Disabled document type causes web service timeout" Implemented validation on resolution of document type. --- ktapi/KTAPIFolder.inc.php | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/ktapi/KTAPIFolder.inc.php b/ktapi/KTAPIFolder.inc.php index 4a669b9..2085307 100644 --- a/ktapi/KTAPIFolder.inc.php +++ b/ktapi/KTAPIFolder.inc.php @@ -443,6 +443,11 @@ class KTAPI_Folder extends KTAPI_FolderItem $filename = basename($filename); $documenttypeid = KTAPI::get_documenttypeid($documenttype); + if (PEAR::isError($documenttypeid)) + { + return new PEAR_Error('The document type could not be resolved or is disabled: ' . $documenttype); + } + $options = array( 'contents' => new KTFSFileLike($tempfilename), -- libgit2 0.21.4