catch uri problems detected during construction of Zend_Http_Client
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 21 Oct 2016 12:45:56 +0000 (14:45 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 24 Oct 2016 14:14:14 +0000 (16:14 +0200)
 ... when running scheduled imports

Change-Id: I71db36cb35166e908f265963fe92e4bb80ca4c9d
Reviewed-on: http://gerrit.tine20.com/customers/3674
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Controller/ScheduledImport.php

index 09e5b82..51de0e9 100644 (file)
@@ -150,8 +150,8 @@ class Tinebase_Controller_ScheduledImport extends Tinebase_Controller_Record_Abs
     protected function _getFileToImport($source)
     {
         if (strpos($source, 'http') === 0) {
-            $client = new Zend_Http_Client($source);
             try {
+                $client = new Zend_Http_Client($source);
                 $requestBody = $client->request()->getBody();
             } catch (Exception $e) {
                 Tinebase_Exception::log($e);
@@ -291,4 +291,4 @@ class Tinebase_Controller_ScheduledImport extends Tinebase_Controller_Record_Abs
         
         return $this->create($record);
     }
-}
\ No newline at end of file
+}