From 87470e465159113673b29122631fe2f3d785fc61 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 20 Sep 2023 07:19:02 +1000 Subject: [PATCH] Fix notice error about no buffer to flush --- CRM/Mosaico/Utils.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Mosaico/Utils.php b/CRM/Mosaico/Utils.php index ca3b61a1b..0f23f60d2 100644 --- a/CRM/Mosaico/Utils.php +++ b/CRM/Mosaico/Utils.php @@ -431,7 +431,9 @@ public static function sendImage(string $file) { header("Content-type:" . $mime_type); readfile($file); - ob_flush(); + if (ob_get_length()) { + ob_flush(); + } flush(); }