mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-04 19:03:15 +00:00
Leave failed image URLs in place
This commit is contained in:
parent
ed07c987a6
commit
3e1b98d5d9
1 changed files with 5 additions and 0 deletions
|
@ -220,6 +220,11 @@ function mailstream_do_images(array &$item, array &$attachments)
|
||||||
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-mailstream-');
|
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-mailstream-');
|
||||||
try {
|
try {
|
||||||
$curlResult = DI::httpClient()->fetchFull($url, HttpClientAccept::DEFAULT, 0, $cookiejar);
|
$curlResult = DI::httpClient()->fetchFull($url, HttpClientAccept::DEFAULT, 0, $cookiejar);
|
||||||
|
if (!$curlResult->isSuccess()) {
|
||||||
|
Logger::debug('mailstream: fetch image url failed', [
|
||||||
|
'url' => $url, 'item_id' => $item['id'], 'return_code' => $curlResult->getReturnCode()]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} catch (InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
Logger::error('mailstream_do_images exception fetching url', ['url' => $url, 'item_id' => $item['id']]);
|
Logger::error('mailstream_do_images exception fetching url', ['url' => $url, 'item_id' => $item['id']]);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue