This debug message was to noisy but it is needed in development (where debug-mode...
[mailer.git] / inc / expression-functions.php
index 82ba0ca9a33403dc99b7afd651096295efafbfd0..92e1757623d255c3cc1b2eee383261c4c22e65d9 100644 (file)
@@ -287,8 +287,11 @@ function doExpressionTemplate ($data) {
                // This is very bad and needs fixing
                reportBug(__FUNCTION__, __LINE__, 'current_template in GLOBALS not set, callbackFunction=' . $callbackFunction . ',function_exists()=' . intval(function_exists($callbackFunction)));
        } elseif (!function_exists($callbackFunction)) {
-               // Log missing function
-               logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackFunction . ' does not exist.');
+               // Log missing function only in debug mode
+               if (isDebugModeEnabled()) {
+                       // Log it here
+                       logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackFunction . ' does not exist.');
+               } // END - if
        } else {
                // Do the replacement
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']);