Revize 53b26671
Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)
application/libraries/Bank_Statement_File_Importer.php | ||
---|---|---|
// make download
|
||
$file_data = $this->do_download($bank_account, $settings, $url);
|
||
|
||
if ($file_data == FALSE)
|
||
if ($file_data === FALSE)
|
||
{
|
||
throw new Exception(__('Import download has failed caused by: %s',
|
||
implode('<br>', $driver->get_errors())));
|
||
... | ... | |
* @param Bank_account_Model $bank_account
|
||
* @param Bank_Account_Settings $settings
|
||
* @param string $url Prepare download URL
|
||
* @return string Content of downloaded file
|
||
* @return string Content of downloaded file or FALSE on error
|
||
*/
|
||
protected function do_download(Bank_account_Model $bank_account,
|
||
Bank_Account_Settings $settings, $url)
|
||
... | ... | |
$e = error_get_last();
|
||
$m = __('Cannot download statement from ') . ' "' . $url . '": '
|
||
. (isset($e['message']) ? $e['message'] : '');
|
||
throw new InvalidArgumentException($m);
|
||
$this->add_error($m);
|
||
return FALSE;
|
||
}
|
||
|
||
return $fd;
|
Také k dispozici: Unified diff
Default do_download error handling fix. WS polishing (tabs not expanded).