Fixes for missing parameters for debug_report_bug(), was introduced in some revisions ago
authorRoland Häder <roland@mxchange.org>
Sat, 26 Jun 2010 16:48:35 +0000 (16:48 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 26 Jun 2010 16:48:35 +0000 (16:48 +0000)
inc/extensions-functions.php
inc/functions.php
inc/language-functions.php
inc/wrapper-functions.php

index fd17c33bd1149abf4546e74a0e0356b404d271e4..a05bb7b4e183df819de0ec99728d57f49553992a 100644 (file)
@@ -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!
index cfde41fa538b8be08c2cf5e7ec03a64c3cb625a6..f303ce5c685ca3ce250ce42d5c270a661dd21dab 100644 (file)
@@ -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
index f1d7f0ac93b385c4135aae61daf3dd9828c61b5e..ccf61cb51e3c1cccba7eeaeea909b4772102f8b6 100644 (file)
@@ -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
index a6f08285da2b4ec7c151616aa68971f0ff8fcf87..9615ce1fc959667a200e1c04b57e5ea6366a5275 100644 (file)
@@ -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