]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
debug_report_bug() should be used as a replacement for app_die() calls
[mailer.git] / inc / filters.php
index 4dcb9e3f0f0d3999e1f69a5f202980678eb6af65..424fe9f1048fe3fb6e7ef46971215bb7a7a2799a 100644 (file)
@@ -190,7 +190,7 @@ function FILTER_SOLVE_TASK ($data) {
                adminSolveTask($data['task_id']);
        } else {
                // Not detectable!
-               debug_report_bug(sprintf("Cannot resolve task. data[%s]=<pre>%s</pre>", gettype($data), print_r($data, true)));
+               debug_report_bug(__FUNCTION__, __LINE__, sprintf("Cannot resolve task. data[%s]=<pre>%s</pre>", gettype($data), print_r($data, true)));
        }
 
        // Return the data
@@ -202,7 +202,7 @@ function FILTER_LOAD_INCLUDES ($pool) {
        // Is it null?
        if (is_null($pool)) {
                // This should not happen!
-               debug_report_bug('pool is null.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'pool is null.');
        } // END - if
 
        // Is the pool an array and 'pool' set?
@@ -220,7 +220,7 @@ function FILTER_LOAD_INCLUDES ($pool) {
        // Is it an array?
        if ((!isset($data)) || (!is_array($data))) {
                // Then abort here
-               debug_report_bug(sprintf("INC_POOL is no array! Type: %s", gettype($data)));
+               debug_report_bug(__FUNCTION__, __LINE__, sprintf("INC_POOL is no array! Type: %s", gettype($data)));
        } elseif (isset($data['inc_pool'])) {
                // Use this as new inclusion pool!
                setIncludePool($realPool, $data['inc_pool']);
@@ -489,7 +489,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($code) {
                                $code = call_user_func($commandFunction, $data);
                        } else {
                                // Unsupported command detected
-                               debug_report_bug('Command=' . $cmd . ', callback=' . $callback . ', extra=' . $extraFunction . ' is unsupported.');
+                               debug_report_bug(__FUNCTION__, __LINE__, 'Command=' . $cmd . ', callback=' . $callback . ', extra=' . $extraFunction . ' is unsupported.');
                        }
                } // END - foreach
        } // END - if
@@ -521,7 +521,7 @@ function FILTER_RUN_RESET_INCLUDES () {
        // Is the reset set or old sql_patches?
        if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == '0')) {
                // Then abort here
-               debug_report_bug('Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks');
        } // END - if
 
        // Get more daily reset scripts
@@ -885,7 +885,7 @@ function FILTER_FETCH_USER_DATA ($userid = 0) {
        // Get user data
        if (!fetchUserData($userid)) {
                // Userid is not valid
-               debug_report_bug('User id '.$userid . ' is invalid.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'User id '.$userid . ' is invalid.');
        } // END - if
 
        // Set member id
@@ -897,7 +897,7 @@ function FILTER_RESET_USER_LOGIN_FAILURE () {
        // Is the user data valid?
        if (!isMember()) {
                // Do only run for logged in members
-               debug_report_bug('Please only run this filter for logged in users.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
        } // END - if
 
        // Remmeber login failures if available
@@ -911,7 +911,7 @@ SET
 WHERE
        `userid`=%s
 LIMIT 1",
-                       array(getMemberId()), __FILE__, __LINE__);
+                       array(getMemberId()), __FUNCTION__, __LINE__);
 
                // Store it in session
                setSession('mailer_member_failures' , getUserData('login_failures'));