4875: report HTTPRequest errors
authorTJ <acontent@iam.tj>
Sat, 8 Oct 2011 20:30:14 +0000 (21:30 +0100)
committerTJ <acontent@iam.tj>
Fri, 21 Oct 2011 15:23:58 +0000 (16:23 +0100)
home/ims/ims_import.php

index b02f8ac..0d0fba1 100644 (file)
@@ -825,7 +825,10 @@ if (isset($_REQUEST['url']) && ($_REQUEST['url'] != 'http://') ) {
                        exit;
                }
                fclose($fp);
-       }       
+       }
+       else {
+               $msg->addError(array('IMPORT_FAILED', $http_req->_errno . ": " . $http_req->_errstr));
+       }
        $_FILES['file']['name']     = $filename;
        $_FILES['file']['tmp_name'] = $full_filename;
        $_FILES['file']['size']     = strlen($content);