The fixed-target branch of Notify::send built the PDF path as "$dir_output/$ref/$ref.pdf" while $dir_output already includes the get_exdir(...) ref subdirectory. The double ref segment made dol_is_file always fail and the PDF was never attached when a notification was routed to a fixed email address. The matching block just above for user/group targets has always used the correct "$dir_output/$ref.pdf" form. Drop the extra ref segment so both branches produce the same path. Signed-off-by: Dolicraft <contact@dolicraft.com> Co-authored-by: Dolicraft <contact@dolicraft.com>
This commit is contained in:
parent
3dcfa2981e
commit
155b4de1b7
1 changed files with 1 additions and 1 deletions
|
|
@ -1269,7 +1269,7 @@ class Notify
|
|||
break;
|
||||
}
|
||||
$ref = dol_sanitizeFileName($newref);
|
||||
$pdf_path = $dir_output."/".$ref."/".$ref.".pdf";
|
||||
$pdf_path = $dir_output."/".$ref.".pdf";
|
||||
if (!dol_is_file($pdf_path)) {
|
||||
// We can't add PDF as it is not generated yet.
|
||||
$filepdf = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue