Commit 905682c0947e9d49d9db4db53b94696547eff30a

Authored by conradverm
1 parent 50deffd4

WSA-52

"Webservice File Download"
Fixed. Improved error handling in file download in PHP KTWSAPI

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7630 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 8 additions and 0 deletions
ktwsapi/php/ktwsapi.inc.php
... ... @@ -160,6 +160,14 @@ class KTWSAPI_FolderItem
160 160 curl_setopt($ch, CURLOPT_URL, $url);
161 161  
162 162 $response = curl_exec($ch);
  163 + if ($response == false)
  164 + {
  165 + $response = new PEAR_Error(curl_error($ch));
  166 + }
  167 + else
  168 + {
  169 + $response = true;
  170 + }
163 171 curl_close($ch);
164 172  
165 173 fclose($fp);
... ...