]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Misc cleanups
[mailer.git] / inc / template-functions.php
index fca55228928da38153439dff3963d80f4bde6dcc..2259ffc2e5dd94c3878eb8ab88d0943c47b3ae2d 100644 (file)
@@ -479,7 +479,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load
                }
 
                // Merge data if valid
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - PRE!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - BEFORE!');
                if ((isUserDataValid()) && ($loadUserData === true)) {
                        // It is valid
                        $content = merge_array($content, getUserDataArray());
@@ -541,7 +541,10 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load
                $newContent = "Compiler error for template " . $template . " !\nUncompiled content:\n" . $GLOBALS['tpl_content'][$template];
 
                // Add last error if the required function exists
-               if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx.";
+               if (function_exists('error_get_last')) {
+                       // Add last error and some lines for better overview
+                       $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx.";
+               } // END - if
        } // END - if
 
        // Remove content and data