From 155b4de1b7f0f4f27b00a26f34ef9900e3195fa5 Mon Sep 17 00:00:00 2001 From: w3houde Date: Fri, 12 Jun 2026 19:47:19 +0200 Subject: [PATCH] Fix #35661 drop duplicated ref segment in notify pdf path (#38746) 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 Co-authored-by: Dolicraft --- htdocs/core/class/notify.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 7bb1ce43f5f..398d2006f0f 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -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 = '';