From: Roland Häder Date: Sat, 26 Jun 2010 16:48:35 +0000 (+0000) Subject: Fixes for missing parameters for debug_report_bug(), was introduced in some revisions ago X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=55b296b02c79cbf1cfce37192bbdaeeee31e6741;p=mailer.git Fixes for missing parameters for debug_report_bug(), was introduced in some revisions ago --- diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index fd17c33bd1..a05bb7b4e1 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { function loadExtension ($ext_name, $ext_mode = 'init', $ext_ver = '', $dry_run = false) { // If this happens twice, we need the bug report from you, except for updates/tests if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) { - debug_report_bug(__FUNCTION__ . '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true)); + debug_report_bug(__FUNCTION__, __LINE__, '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true)); } // END - if // Make sure this situation can only happen once @@ -577,7 +577,7 @@ function getExtensionVersion ($ext_name, $force = false) { // Empty extension name should be fixed! if (empty($ext_name)) { // Please report this bug! - debug_report_bug(__FUNCTION__ . ': ext_name is empty which is not allowed here.'); + debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty which is not allowed here.'); } // END - if // Extensions are all inactive during installation @@ -810,7 +810,7 @@ function getExtensionName ($ext_id) { // Did we find some extension? if (empty($data['ext_name'])) { // We should fix these all! - debug_report_bug(__FUNCTION__ . ': ext_name is empty. ext_id=' . $ext_id); + debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty. ext_id=' . $ext_id); } // END - if // Return the extension name @@ -1209,7 +1209,7 @@ function addExtensionUpdateDependency ($updateDepends) { /* DEBUG: if ((isset($updateDepends, $GLOBALS['ext_running_updates'][getCurrentExtensionName()])) && (in_array($updateDepends, getExtensionUpdatesRunning()))) { // Double-adding isn't fine, too - debug_report_bug(__FUNCTION__ . '() called twice: updateDepends=' . $updateDepends . ',currentExtension=' . getCurrentExtensionName()); + debug_report_bug(__FUNCTION__, __LINE__, '() called twice: updateDepends=' . $updateDepends . ',currentExtension=' . getCurrentExtensionName()); } // END - if */ @@ -1243,7 +1243,7 @@ function initExtensionUpdateDependencies () { // Init update depency map automatically if not found if (isExtensionUpdateDependenciesInitialized()) { // We need these bug reports as well... - debug_report_bug(__FUNCTION__ . '() is called twice: currName=' . getCurrentExtensionName()); + debug_report_bug(__FUNCTION__, __LINE__, '() is called twice: currName=' . getCurrentExtensionName()); } // END - if $GLOBALS['ext_update_depends'][getCurrentExtensionName()] = array(); @@ -1260,7 +1260,7 @@ function addExtensionRunningRegistration ($ext_name) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Registration in progress: ext_name=' . $ext_name . ' - ENTERED!'); if (isExtensionRegistrationRunning($ext_name)) { // This is really bad and should not be quietly ignored - debug_report_bug(__FUNCTION__ . '() already called! ext_name=' . $ext_name); + debug_report_bug(__FUNCTION__, __LINE__, '() already called! ext_name=' . $ext_name); } // END - if // Then add it! diff --git a/inc/functions.php b/inc/functions.php index cfde41fa53..f303ce5c68 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3219,7 +3219,7 @@ function generateExtensionInactiveMessage ($ext_name) { // Is the extension empty? if (empty($ext_name)) { // This should not happen - debug_report_bug(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Parameter ext is empty. This should not happen.'); } // END - if // Default message @@ -3240,7 +3240,7 @@ function generateExtensionNotInstalledMessage ($ext_name) { // Is the extension empty? if (empty($ext_name)) { // This should not happen - debug_report_bug(__FUNCTION__ . ': Parameter ext is empty. This should not happen.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Parameter ext is empty. This should not happen.'); } // END - if // Default message diff --git a/inc/language-functions.php b/inc/language-functions.php index f1d7f0ac93..ccf61cb51e 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -257,13 +257,13 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { // Is one not readable? if (!isIncludeReadable($source)) { // Please report this bug! - debug_report_bug(__FUNCTION__ . ': Source file ' . $source . ' is not readable.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Source file ' . $source . ' is not readable.'); } elseif (!isIncludeReadable($target)) { // Please report this bug! - debug_report_bug(__FUNCTION__ . ': Target file ' . $target . ' is not readable.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Target file ' . $target . ' is not readable.'); } elseif ($targetLanguage == getCurrentLanguage()) { // Must be different - debug_report_bug(__FUNCTION__ . ': Target language ' . $targetLanguage . ' is same as current.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Target language ' . $targetLanguage . ' is same as current.'); } // Backup current messages/language @@ -329,7 +329,7 @@ function isMessageMasked ($messageId) { // Is the message id valid? if (!isMessageIdValid($messageId)) { // No, then abort here - debug_report_bug(__FUNCTION__ . ': Invalid message id ' . $messageId . ' detected.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Invalid message id ' . $messageId . ' detected.'); } // END - if // Now simply check it diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index a6f08285da..9615ce1fc9 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -151,7 +151,7 @@ function merge_array ($array1, $array2) { // Are both an array? if ((!is_array($array1)) && (!is_array($array2))) { // Both are not arrays - debug_report_bug(__FUNCTION__ . ': No arrays provided!'); + debug_report_bug(__FUNCTION__, __LINE__, 'No arrays provided!'); } elseif (!is_array($array1)) { // Left one is not an array debug_report_bug(__FILE__, __LINE__, sprintf("array1 is not an array. array != %s", gettype($array1))); @@ -661,7 +661,7 @@ function isOutputModeSet ($strict = false) { // Should we abort here? if (($strict === true) && ($isset === false)) { // Output backtrace - debug_report_bug(__FUNCTION__, __LINE__, 'output_mode is empty.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Output_mode is empty.'); } // END - if // Return it @@ -678,7 +678,7 @@ function isBlockModeEnabled () { // Abort if not set if (!isset($GLOBALS['block_mode'])) { // Needs to be fixed - debug_report_bug(__FUNCTION__ . ': block_mode is not set.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Block_mode is not set.'); } // END - if // Return it