X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=177886ad3aaf33e96f46aaf77563b558733e8368;hp=cfbd66538429ce16230912500ad6b680bf9f6607;hb=076e28c32b079b93b73a67b0c8710d65596b76a9;hpb=be7955307766dcba3b1f0ae3f53d167afd5d5aaf diff --git a/inc/functions.php b/inc/functions.php index cfbd665384..177886ad3a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -132,7 +132,7 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) { default: // Huh, something goes wrong or maybe you have edited config.php ??? - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid renderer %s detected.", OUTPUT_MODE)); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid renderer %s detected.", OUTPUT_MODE)); MXCHANGE_DIE("".FATAL_ERROR.": ".LANG_NO_RENDER_DIRECT); break; } @@ -259,6 +259,7 @@ function LOAD_TEMPLATE($template, $return=false, $content=array()) { // Translate gender $gender = TRANSLATE_GENDER($gender); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("DEPRECATION-WARNING: content is not array (%s).", gettype($content))); } // Free result @@ -569,7 +570,7 @@ function MAKE_DATETIME ($time, $mode="0") case "2": $ret = date("d.m.Y|H:i", $time); break; case "3": $ret = date("d.m.Y", $time); break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; } break; @@ -581,7 +582,7 @@ function MAKE_DATETIME ($time, $mode="0") case "2": $ret = date("y-m-d|H:i", $time); break; case "3": $ret = date("y-m-d", $time); break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); break; } } @@ -703,7 +704,7 @@ function TRANSLATE_STATUS($status) { break; default: - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $status)); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; break; } @@ -1755,7 +1756,7 @@ function POST_URL ($script, $postData) { // Is postData an array? if (!is_array($postData)) { // Abort here - DEBUG_LOG(__FILE__, __LINE__, sprintf("postData is not an array. Type: %s", gettype($postData))); + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("postData is not an array. Type: %s", gettype($postData))); return array("", "", ""); } // END - if @@ -2384,7 +2385,7 @@ function merge_array ($array1, $array2) { die(""); } // Debug message logger -function DEBUG_LOG ($file, $line, $message, $force=false) { +function DEBUG_LOG ($file, $line, $message, $force=true) { // Is debug mode enabled? if ((isBooleanConstantAndTrue('DEBUG_MODE')) || ($force)) { // Log this message away