X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=e9eb6681020ff46b822479f1b51822ea084c3321;hp=70f99efe2b29638f09fbc9411fc54ef64241df92;hb=a4fc56f660a422a080ff241bd86b772a5b5d0c53;hpb=40e18f1f10e4c7b3e63cf728567459a2cc0dcbd5 diff --git a/inc/functions.php b/inc/functions.php index 70f99efe2b..e9eb668102 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -196,13 +196,18 @@ function OUTPUT_RAW ($HTML) { // Add a fatal error message to the queue array function ADD_FATAL ($message, $extra="") { global $FATAL; + if (empty($extra)) { // Regular text message to add to $FATAL $FATAL[] = $message; } else { // $message is text with a mask plus extras to insert into the text - $FATAL[] = sprintf($message, $extra); + $message = sprintf($message, $extra); + $FATAL[] = $message; } + + // Log fatal messages away + DEBUG_LOG(__FUNCTION__."(".__LINE__."): message={$message}"); } // Load a template file and return it's content (only it's name; do not use ' or ")