catch and ignore ValueError of file_gets_contents('')

This commit is contained in:
ralf 2024-12-14 11:00:56 +01:00
parent abb72e0c78
commit cf211fae87

View File

@ -6960,7 +6960,15 @@ class Mail
}
if ( $myUrl[0]!='/' && strlen($basedir) > 1 && !str_ends_with($basedir, '/')) { $basedir .= '/'; }
if ($needTempFile && empty($attachment) && !str_starts_with($myUrl, "http")) $data = file_get_contents($basedir.urldecode($myUrl));
if ($needTempFile && empty($attachment) && !str_starts_with($myUrl, "http"))
{
try {
$data = file_get_contents($basedir.urldecode($myUrl));
}
catch (\Throwable $e) {
_egw_log_exception($e);
}
}
}
if (str_starts_with($url, 'data:'))
{