Commit 3fdd57853a54dc2262aafdfbb6786a9d7ee9d7b0
1 parent
58adea24
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); | ... | ... |