Commit 524a307c78d97beace36387244d8cb03a6de4897
1 parent
566d8ff3
WSA-9
"Disabled document type causes web service timeout" Implemented validation on resolution of document type. Reviewed By: Jalaloedien Abrahams git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7020 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
5 additions
and
0 deletions
ktapi/KTAPIFolder.inc.php
| @@ -443,6 +443,11 @@ class KTAPI_Folder extends KTAPI_FolderItem | @@ -443,6 +443,11 @@ class KTAPI_Folder extends KTAPI_FolderItem | ||
| 443 | 443 | ||
| 444 | $filename = basename($filename); | 444 | $filename = basename($filename); |
| 445 | $documenttypeid = KTAPI::get_documenttypeid($documenttype); | 445 | $documenttypeid = KTAPI::get_documenttypeid($documenttype); |
| 446 | + if (PEAR::isError($documenttypeid)) | ||
| 447 | + { | ||
| 448 | + return new PEAR_Error('The document type could not be resolved or is disabled: ' . $documenttype); | ||
| 449 | + } | ||
| 450 | + | ||
| 446 | 451 | ||
| 447 | $options = array( | 452 | $options = array( |
| 448 | 'contents' => new KTFSFileLike($tempfilename), | 453 | 'contents' => new KTFSFileLike($tempfilename), |