// Create file
if ($this->isCacheReadable()) changeMode($this->fqfn, 0666);
- $this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !");
+ $this->pointer = fopen($this->fqfn, 'w') or debug_report_bug(__METHOD__, __LINE__, 'Cannot write to cache ' . $this->fqfn . ' !');
// Add open PHP tag
fwrite($this->pointer, "<?php\n");
$this->removeCacheFile(true);
// Unsupported cache found!
- debug_report_bug('Unsupported cache ' . $this->name . ' detected.');
+ debug_report_bug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected.');
}
// Write cache line to file
} // END - if
} else {
// Cache file not found or not readable
- debug_report_bug($this->name);
+ debug_report_bug(__METHOD__, __LINE__, $this->name);
addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
// Try to remove it
}
} elseif (isset($value[0])) {
// These lines needs fixing
- debug_report_bug('Invalid entry with [0] found. key=' . $key);
+ debug_report_bug(__METHOD__, __LINE__, 'Invalid entry with [0] found. key=' . $key);
} else {
// Non-string
$line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = ' . $value . ";\n";
// Is the key set?
if (!isCodeSet($key)) {
// Abort here
- debug_report_bug(sprintf("%s[%s:] Code %s is not set.",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s[%s:] Code %s is not set.",
__FUNCTION__,
__LINE__,
$key
// Init not if already found
if (isConfigurationLoaded()) {
// Already initialized
- debug_report_bug(sprintf("[%s:%s] Configuration is already initialized.", __FUNCTION__, __LINE__));
+ debug_report_bug(__FUNCTION__, __LINE__, 'Configuration is already initialized.');
} // END - if
// Set a minimum of configuration, required to by-pass some error triggers in getConfig()
// Is the entry there?
if (!isset($GLOBALS['config'][$configEntry])) {
// Raise an error of missing entries
- debug_report_bug(sprintf("[%s:%s] Configuration entry <em>%s</em> is missing.",
- __FUNCTION__,
- __LINE__,
- $configEntry
- ));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Configuration entry <em>%s</em> is missing.", $configEntry));
} // END - if
// Return it
// Check if string or number but no array
if (is_array($values[$idx])) {
// Arrays must be fixed...
- debug_report_bug('values[' . $idx . '] should not be an array! Content=<pre>'.print_r($values[$idx], true).'</pre>');
+ debug_report_bug(__FUNCTION__, __LINE__, 'values[' . $idx . '] should not be an array! Content=<pre>'.print_r($values[$idx], true).'</pre>');
} elseif (($values[$idx] + 0) === $values[$idx]) {
// Number detected
$all .= sprintf("`%s`=%s,", $entry, (float)$values[$idx]);
// Link is up?
if (!SQL_IS_LINK_UP()) {
// We should not quietly ignore this!
- debug_report_bug(sprintf("Cannot query database: sqlString=%s,file=%s,line=%s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Cannot query database: sqlString=%s,file=%s,line=%s",
$sqlString,
basename($F),
$L
return false;
} elseif (empty($sqlString)) {
// Empty SQL string!
- debug_report_bug(sprintf("SQL string is empty. Please fix this. file=%s, line=%s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("SQL string is empty. Please fix this. file=%s, line=%s",
basename($F),
$L
));
// Run SQL command
//* DEBUG: */ print('F=' . basename($F) . ',L=' . $L . 'sql=' . htmlentities($sqlString) . '<br />');
$result = mysql_query($sqlString, SQL_GET_LINK())
- or debug_report_bug('[' . __FUNCTION__ . ':' . __LINE__ . '] ' . $F . ' (' . $L . '):' . mysql_error() . "\n".
+ or debug_report_bug(__FUNCTION__, __LINE__, 'file='. $F . ',line=' . $L . ':mysql_error()=' . mysql_error() . "\n".
'Query string:' . $sqlString);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sqlString . ',numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS());
//
// Debugging stuff...
//
- $fp = fopen(getConfig('CACHE_PATH') . 'mysql.log', 'a') or app_die(__FILE__, __LINE__, 'Cannot write mysql.log!');
+ $fp = fopen(getConfig('CACHE_PATH') . 'mysql.log', 'a') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot write mysql.log!');
if (!isset($GLOBALS['sql_first_entry'])) {
// Write first entry
fwrite($fp, 'Module=' . getModule() . "\n");
// Debugging
//
- //* DEBUG: */ $fp = fopen(getConfig('CACHE_PATH') . 'escape_debug.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!");
+ //* DEBUG: */ $fp = fopen(getConfig('CACHE_PATH') . 'escape_debug.log', 'a') or debug_report_bug(__FUNCTION__, __LINE__, "Cannot write debug.log!");
//* DEBUG: */ fwrite($fp, $F.'('.$L."): ".str_replace("\r", '', str_replace("\n", ' ', $eval))."\n");
//* DEBUG: */ fclose($fp);
// Is columns an array?
if (!is_array($columns)) {
// No array
- debug_report_bug(sprintf("columns is not an array. %s != array, file=%s, line=%s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("columns is not an array. %s != array, file=%s, line=%s",
gettype($columns),
basename($F),
$L
// Get column information
$result = SQL_QUERY_ESC("SHOW COLUMNS FROM `%s` LIKE '%s'",
- array($tableName, $columnName), __FILE__, __LINE__);
+ array($tableName, $columnName), __FUNCTION__, __LINE__);
// Do we have no entry on ADD or an entry on DROP?
// 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321
} // END - if
// Show indexes
- $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", array($tableName), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", array($tableName), __FUNCTION__, __LINE__);
// Non-skipping is default for ADD
$skip = false;
// Is this a resource or null?
if ((!is_resource($link)) && (!is_null($link))) {
// This should never happen!
- debug_report_bug(sprintf("link is not resource or null. Type: %s", gettype($link)));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("link is not resource or null. Type: %s", gettype($link)));
} // END - if
// Set it
// Still zero and not in dry-run?
if (($task_id == '0') && (!getExtensionDryRun())) {
// Then request a bug report
- debug_report_bug(sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
__FUNCTION__,
getCurrentExtensionName()
));
incrementStatsEntry('cache_hits');
} elseif (isset($GLOBALS['ext_loaded'][$ext_name])) {
// @TODO Extension is loaded, what next?
- app_die(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name);
+ debug_report_bug(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name);
} elseif (($ext_name == 'cache') || (!isExtensionInstalled('cache'))) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
// Load from database
$data = SQL_FETCHARRAY($result);
} elseif (isDebugModeEnabled()) {
// Not found, please report all
- debug_report_bug(sprintf(": Cannot find extension %s in database!", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf(": Cannot find extension %s in database!", $ext_name));
}
// Free result
// Extension version should not be invalid
if (($data['ext_version'] == 'false') && ($force === false)) {
// Please report this trouble
- debug_report_bug(sprintf("Extension <span class=\"data\">%s</span> has empty version!", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension <span class=\"data\">%s</span> has empty version!", $ext_name));
} // END - if
// Return result
} // END - if
} else {
// Extension not there! :-(
- debug_report_bug(sprintf("Extension <span class=\"data\">%s</span> not found but should be updated?", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension <span class=\"data\">%s</span> not found but should be updated?", $ext_name));
}
}
// Is the update depency empty? (NEED TO BE FIXED!)
if (empty($updateDepends)) {
// Please report this bug!
- debug_report_bug('updateDepends is empty: currentExtension=' . getCurrentExtensionName());
+ debug_report_bug(__FUNCTION__, __LINE__, 'updateDepends is empty: currentExtension=' . getCurrentExtensionName());
} // END - if
// Is it not yet added?
// Output debug backtrace if not found (SHOULD NOT HAPPEN!)
if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) {
// Not found, should not happen
- debug_report_bug(sprintf("ext_sqls is empty, current extension: %s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s",
getCurrentExtensionName()
));
} // END - if
// ext_ver should never be empty in other modes than 'test'
if ((empty($ext_ver)) && (getExtensionMode() != 'test')) {
// Please report all these messages
- debug_report_bug('ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode());
+ debug_report_bug(__FUNCTION__, __LINE__, 'ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode());
} // END - if
// Add version
// Is it readable?
if (!isExtensionIncludeReadable()) {
// Not readable
- debug_report_bug('Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.');
} // END - if
// Generate INC name
updateConfiguration('file_hash', '');
// Cannot read secret file!
- app_die(__FILE__, __LINE__, 'Cannot read secret file! Please try to reload.');
+ debug_report_bug(__FILE__, __LINE__, 'Cannot read secret file! Please try to reload.');
}
} // END - if
// Is the filter already initialized?
if (isset($GLOBALS['filter_init'])) {
// Then abort here
- debug_report_bug('Filter system already initialized.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Filter system already initialized.');
} // END - if
// Load all saved filers if sql_patches is updated
// In installation phase we always want to abort
if (($silentAbort === false) || (isInstallationPhase())) {
// Add fatal message
- debug_report_bug(sprintf("[%s:%s] Filter chain %s has already filter function %s registered!", __FUNCTION__, __LINE__, $filterName, $filterFunction));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered!", $filterName, $filterFunction));
} // END - if
// Abort here
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
// 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?
// 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']);
$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
// 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
// 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
// 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
WHERE
`userid`=%s
LIMIT 1",
- array(getMemberId()), __FILE__, __LINE__);
+ array(getMemberId()), __FUNCTION__, __LINE__);
// Store it in session
setSession('mailer_member_failures' , getUserData('login_failures'));
default:
// Huh, something goes wrong or maybe you have edited config.php ???
- app_die(__FUNCTION__, __LINE__, '<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}');
+ debug_report_bug(__FUNCTION__, __LINE__, '<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}');
break;
} // END - switch
} elseif ((getPhpCaching() == 'on') && ((!isset($GLOBALS['header'])) || (count($GLOBALS['header']) == 0))) {
// Was that eval okay?
if (empty($newContent)) {
// Something went wrong!
- debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>', false);
+ debug_report_bug(__FUNCTION__, __LINE__, 'Evaluation error:<pre>' . linenumberCode($eval) . '</pre>', false);
} // END - if
// Use it again
// Load a template file and return it's content (only it's name; do not use ' or ")
function loadTemplate ($template, $return = false, $content = array()) {
// @TODO Remove this sanity-check if all is fine
- if (!is_bool($return)) debug_report_bug('return is not bool (' . gettype($return) . ')');
+ if (!is_bool($return)) debug_report_bug(__FUNCTION__, __LINE__, 'return is not bool (' . gettype($return) . ')');
// @TODO Try to rewrite all $DATA to $content
global $DATA;
case 'C': $ret = getMessage('GENDER_C'); break;
default:
// Please report bugs on unknown genders
- debug_report_bug(sprintf("Unknown gender %s detected.", $gender));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown gender %s detected.", $gender));
break;
} // END - switch
default:
// Please report all unknown status
- debug_report_bug(sprintf("Unknown status %s detected.", $status));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
break;
} // END - switch
} // END - if
// Three different ways to debug...
- //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
+ //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $URL);
//* DEBUG: */ die($URL);
// Is this URL set?
if (is_null($URL)) {
// Then abort here
- debug_report_bug(sprintf("Configuration entry %s is not set!", $configEntry));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Configuration entry %s is not set!", $configEntry));
} // END - if
// Load the URL
// Has the whole value changed?
if (('' . $ret . '' != '' . $num . '') && ($abortOnMismatch === true)) {
// Log the values
- debug_report_bug('Problem with number found. ret=' . $ret . ', num='. $num);
+ debug_report_bug(__FUNCTION__, __LINE__, 'Problem with number found. ret=' . $ret . ', num='. $num);
} // END - if
// Return result
// Is the code size oversized or shouldn't we display it?
if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == '0')) {
// Stop execution of function here because of over-sized code length
- debug_report_bug('img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length'));
+ debug_report_bug(__FUNCTION__, __LINE__, 'img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length'));
} elseif ($headerSent === false) {
// Return an HTML code here
return '<img src="{%url=img.php?code=' . $img_code . '%}" alt="Image" />';
// Generate a list of administrative links to a given userid
function generateMemberAdminActionLinks ($userid, $status = '') {
// Make sure userid is a number
- if ($userid != bigintval($userid)) debug_report_bug('userid is not a number!');
+ if ($userid != bigintval($userid)) debug_report_bug(__FUNCTION__, __LINE__, 'userid is not a number!');
// Define all main targets
$targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
// Do we miss an arry element here?
if (!isConfigEntrySet('file_hash')) {
// Stop here
- debug_report_bug('Missing file_hash in ' . __FUNCTION__ . '.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Missing file_hash in ' . __FUNCTION__ . '.');
} // END - if
// When the salt is empty build a new one, else use the first x configured characters as the salt
loadIncludeOnce('inc/footer.php');
} else {
// Script tried to kill itself twice
- debug_report_bug('Script wanted to kill itself more than once! Raw message=' . $message . ', file/function=' . $F . ', line=' . $L);
+ die('['.__FUNCTION__.':'.__LINE__.']: Script wanted to kill itself more than once! Raw message=' . $message . ', file/function=' . $F . ', line=' . $L);
}
}
}
// Output a debug backtrace to the user
-function debug_report_bug ($message = '', $sendEmail = true) {
+function debug_report_bug ($F, $L, $message = '', $sendEmail = true) {
// Is this already called?
if (isset($GLOBALS[__FUNCTION__])) {
// Other backtrace
);
// @TODO Add a little more infos here
- logDebugMessage(__FUNCTION__, __LINE__, strip_tags($message));
+ logDebugMessage($F, $L, strip_tags($message));
} // END - if
// Add output
} // END - if
// And abort here
- app_die(__FUNCTION__, __LINE__, $debug);
+ app_die($F, $L, $debug);
}
// Generates a ***weak*** seed
case getCode('URL_TLOCK'):
// @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
$result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('id'))), __FUNCTION__, __LINE__);
// Load timestamp from last order
list($timestamp) = SQL_FETCHROW($result);
// Remove CRLF
$message = str_replace("\r", '', str_replace("\n", '', $message));
- // Log this message away, we better don't call app_die() here to prevent an endless loop
- $fp = fopen(getConfig('CACHE_PATH') . 'debug.log', 'a') or die(__FUNCTION__.'['.__LINE__.']: Cannot write logfile debug.log!');
+ // Log this message away
+ $fp = fopen(getConfig('CACHE_PATH') . 'debug.log', 'a') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot write logfile debug.log!');
fwrite($fp, date('d.m.Y|H:i:s', time()) . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message . "\n");
fclose($fp);
} // END - if
// Check if not in installation phase and the link is up
if ((!isInstallationPhase()) && (SQL_IS_LINK_UP())) {
// Close link
- SQL_CLOSE(__FILE__, __LINE__);
+ SQL_CLOSE(__FUNCTION__, __LINE__);
} elseif (!isInstallationPhase()) {
// No database link
- addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN'));
+ addFatalMessage(__FUNCTION__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN'));
}
// Stop executing here
// Setter for member id
function setMemberId ($memberid) {
// We should not set member id to zero
- if ($memberid == '0') debug_report_bug('Userid should not be set zero.');
+ if ($memberid == '0') debug_report_bug(__FUNCTION__, __LINE__, 'Userid should not be set zero.');
// Set it secured
$GLOBALS['member_id'] = bigintval($memberid);
// Is the extra title set?
if (!isExtraTitleSet()) {
// No, then abort here
- debug_report_bug('extra_title is not set!');
+ debug_report_bug(__FUNCTION__, __LINE__, 'extra_title is not set!');
} // END - if
// Return it
$files = array();
// Open directory
- $dirPointer = opendir(getConfig('PATH') . $baseDir) or app_die(__FUNCTION__, __LINE__, 'Cannot read directory ' . basename($baseDir) . '.');
+ $dirPointer = opendir(getConfig('PATH') . $baseDir) or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot read directory ' . basename($baseDir) . '.');
// Read all entries
while ($baseFile = readdir($dirPointer)) {
}
} else {
// We found .php file but should not search for them, why?
- debug_report_bug('We should find files with extension=' . $extension . ', but we found a PHP script.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'We should find files with extension=' . $extension . ', but we found a PHP script.');
}
} elseif (substr($baseFile, -4, 4) == $extension) {
// Other, generic file found
$GLOBALS['cache_instance'] = new CacheSystem();
if ($GLOBALS['cache_instance']->getStatus() != 'done') {
// Failed to initialize cache sustem
- addFatalMessage(__FILE__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_CANNOT_INITIALIZE'));
+ addFatalMessage(__FUNCTION__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_CANNOT_INITIALIZE'));
} // END - if
}
$pageTitle = getMessage('NO_CONFIG_FOUND_TITLE');
// Do not add the fatal message in installation mode
- if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND'));
+ if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FUNCTION__, __LINE__, getMessage('NO_CONFIG_FOUND'));
}
// Return title
break;
default: // Unsupported file name / access level
- debug_report_bug('Unsupported file name=' . basename($file) . '/access level=' . $accessLevel);
+ debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported file name=' . basename($file) . '/access level=' . $accessLevel);
break;
}
);
// Output message to user and die
- debug_report_bug($message);
+ debug_report_bug($errfile, $errline, $message);
}
// Init error handler
// Is the include file there?
if (!isIncludeReadable($inc)) {
// Not there so log it
- debug_report_bug(sprintf("Include file %s not found.", $inc));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", $inc));
} // END - if
} // END - if
mergeSqls(explode(";\n", $fileContent), 'install');
} else {
// Not readable!
- debug_report_bug(sprintf("SQL dump %s is not readable!", $dump));
+ debug_report_bug(__FILE__, __LINE__, sprintf("SQL dump %s is not readable!", $dump));
}
} // END - foreach
//* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'<pre>'.print_r(getSqls(), true).'</pre>');
if ((!empty($element)) && (isset($postData[$element]))) {
// Save this setting
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `%s`='%s' WHERE `id`=%s LIMIT 1",
- array($element, $postData[$element][$id], $id), __FILE__, __LINE__);
+ array($element, $postData[$element][$id], $id), __FUNCTION__, __LINE__);
// Admin account saved
$message = getMessage('ADMIN_ACCOUNT_SAVED');
function getAdminLoginFailures ($adminLogin) {
// Admin login should not be empty
if (empty($adminLogin)) {
- debug_report_bug('adminLogin is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'adminLogin is empty.');
} // END - if
// By default no admin is found
function getAdminLastFailure ($adminLogin) {
// Admin login should not be empty
if (empty($adminLogin)) {
- debug_report_bug('adminLogin is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'adminLogin is empty.');
} // END - if
// By default no admin is found
// 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
// Bonus is not given by default ;-)
LIMIT 1",
array(
getMemberId()
- ), __FILE__, __LINE__
+ ), __FUNCTION__, __LINE__
);
// Updated entry?
// Is the function valid?
if (!function_exists($functionName)) {
// Invalid function name
- debug_report_bug('Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false);
+ debug_report_bug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false);
} // END - if
// Call-back the method handling our request
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $id . ' is smaller than 1.');
} // END - if
// Set current network id
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network type id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $id . ' is smaller than 1.');
} // END - if
// Set current network id
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network type id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network type id ' . $id . ' is smaller than 1.');
} // END - if
// By default we have no data
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network request parameter id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $id . ' is smaller than 1.');
} // END - if
// By default we have no data
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network id ' . $id . ' is smaller than 1.');
} // END - if
// Just call our inner method
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network type handler id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network type handler id ' . $id . ' is smaller than 1.');
} // END - if
// Just call our inner method
// Ids lower one are not accepted
if ($id < 1) {
// Not good, should be fixed
- debug_report_bug('Network request parameter id ' . $id . ' is smaller than 1.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Network request parameter id ' . $id . ' is smaller than 1.');
} // END - if
// Just call our inner method
function doAdminRemoveNetworkEntry ($table, $column, $id, $limit = 1) {
// Remove the entry
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_network_%s` WHERE `%s`=%s LIMIT %s",
- array($table, $column, $id, $limit), __FILE__, __LINE__);
+ array($table, $column, $id, $limit), __FUNCTION__, __LINE__);
// Return affected rows
return SQL_AFFECTEDROWS();
FROM
`{?_MYSQL_PREFIX?}_network_data`
ORDER BY
- `network_short_name` ASC", __FILE__, __LINE__);
+ `network_short_name` ASC", __FUNCTION__, __LINE__);
// Do we have entries?
if (SQL_NUMROWS($result) > 0) {
`network_type_handle` ASC",
array(
bigintval($networkId)
- ), __FILE__, __LINE__);
+ ), __FUNCTION__, __LINE__);
// Do we have entries?
if (SQL_NUMROWS($result) > 0) {
t.`network_id`=d.`network_id`
ORDER BY
d.`network_short_name` ASC,
- t.`network_type_handle` ASC", __FILE__, __LINE__);
+ t.`network_type_handle` ASC", __FUNCTION__, __LINE__);
// Do we have entries?
if (SQL_NUMROWS($result) > 0) {
$OUT .= loadTemplate('admin_del_networks_row', true, $networkData);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Switch colors
loadTemplate('admin_del_networks', false, $OUT);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Don't display the list/add new form
$OUT .= loadTemplate('admin_del_network_types_row', true, $networkTypeData);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Switch colors
loadTemplate('admin_del_network_types', false, $content);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Don't display the list/add new form
$OUT .= loadTemplate('admin_del_network_params_row', true, $networkRequestData);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Switch colors
loadTemplate('admin_del_network_params', false, $content);
} else {
// Problem!
- debug_report_bug('Cannot detect edit/del.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot detect edit/del.');
}
// Don't display the list/add new form
// Do we have this enty?
if (!isset($entry[$id])) {
// Not found, needs fixing
- debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
} // END - if
// Add this entry
// Do we have this enty?
if (!isset($entry[$id])) {
// Not found, needs fixing
- debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
} // END - if
// Fix empty network_type_banner_url to NULL
// Do we have this enty?
if (!isset($entry[$id])) {
// Not found, needs fixing
- debug_report_bug('No entry in key=' . $key . ', id=' . $id . ' found.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $id . ' found.');
} // END - if
// Fix empty request_param_default to NULL
// Empty session?
if (session_id() == '') {
// This is invalid here!
- debug_report_bug('Invalid session.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Invalid session.');
} // END - if
// Initialize variables
bigintval(postRequestParameter('refid')),
$hash,
detectRemoteAddr(),
- ), __FILE__, __LINE__);
+ ), __FUNCTION__, __LINE__);
// Get his userid
$userid = bigintval(SQL_INSERTID());
// @TODO Rewrite this whole if() block to addPointsThroughReferalSystem(). This will also make following if() block obsolete
// @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1",
- array($userid), __FILE__, __LINE__);
+ array($userid), __FUNCTION__, __LINE__);
if (SQL_HASZERONUMS($result)) {
// Add only when the line was not found (maybe some more secure?)
$locked = 'points';
if (getConfig('ref_payout') > 0) $locked = 'locked_points';
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`, `ref_depth`, `%s`) VALUES (%s,0,'{?points_register?}')",
- array($locked, $userid), __FILE__, __LINE__);
+ array($locked, $userid), __FUNCTION__, __LINE__);
// Update mediadata as well
if ((isExtensionInstalledAndNewer('mediadata', '0.0.4')) && ($locked == 'points')) {
if ($joined == 'Y') {
// Insert category entry
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s, %s)",
- array($userid, bigintval($cat)), __FILE__, __LINE__);
+ array($userid, bigintval($cat)), __FUNCTION__, __LINE__);
} // END - if
} // END - foreach
} // END - if
print('<pre>');
print_r($GLOBALS['surfbar_cache']);
print('</pre>');
- debug_report_bug('Element ' . $element . ' not found.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Element ' . $element . ' not found.');
}
// Return result
`{?_MYSQL_PREFIX?}_themes`
".$add."
ORDER BY
- `theme_name` ASC", __FILE__, __LINE__);
+ `theme_name` ASC", __FUNCTION__, __LINE__);
// Load all themes
while ($content = SQL_FETCHARRAY($result)) {
// 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
// Change to new theme
$return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode];
} else {
// Log missing entries
- debug_report_bug(sprintf("Unknown error code <strong>%s[%s]</strong> detected.", $errorCode, gettype($errorCode)));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown error code <strong>%s[%s]</strong> detected.", $errorCode, gettype($errorCode)));
}
// Return value
} else {
// Should not happen!
- debug_report_bug('Cannot parse response. Raw response:<pre>' . print_r($response, true) . '</pre>');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:<pre>' . print_r($response, true) . '</pre>');
}
// Fix empty code to bad
setConfigEntry('OUTPUT_MODE', 'render');
// Both exist! This is bad and should be avoided by the admin
- app_die(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>'.getConfig('CACHE_PATH').'config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.');
+ debug_report_bug(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>'.getConfig('CACHE_PATH').'config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.');
} elseif (isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php')) {
// Then load it
loadIncludeOnce(getConfig('CACHE_PATH') . 'config-local.php');
outputHtml('<strong>{--MAILER_WARNING--}:</strong>');
if (isInstalled()) {
// You have changed my configuration file!
- app_die(__FILE__, __LINE__, '{--DIE_CONFIG_CHANGED_YOU--}');
+ debug_report_bug(__FILE__, __LINE__, '{--DIE_CONFIG_CHANGED_YOU--}');
} else {
// Please run the installation script (maybe again)
- app_die(__FILE__, __LINE__, '{--DIE_RUN_INSTALL_MYSQL--}');
+ debug_report_bug(__FILE__, __LINE__, '{--DIE_RUN_INSTALL_MYSQL--}');
}
} elseif ((!isInstalling()) && (!isInstallationPhase()) && (empty($GLOBALS['mysql']['password'])) && (getConfig('WARN_NO_PASS') == 'Y')) {
// No database password entered!!!
// Do only process valid arrays
if (!isset($modArray['module'])) {
// We should fix this!
- debug_report_bug('modArray=<pre>'.print_r($modArray, true).'</pre>');
+ debug_report_bug(__FILE__, __LINE__, 'modArray=<pre>'.print_r($modArray, true).'</pre>');
} // END - if
// Rewrite some parts
} // END - if
} elseif (isset($content[$column])) {
// Unfinished!
- app_die(__FUNCTION__, __LINE__, ":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}");
+ debug_report_bug(__FUNCTION__, __LINE__, ":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}");
}
} // END - foreach
// Is the id not set, then we need a backtrace here... :(
if ($id <= 0) {
// Initiate backtrace
- debug_report_bug(sprintf("id is invalid: %s. row=%s, data=%s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("id is invalid: %s. row=%s, data=%s",
$id,
$row,
$data
$taskData['text'] .= getExtensionNotes();
} else {
// This should not normally happen!
- debug_report_bug('ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . getExtensionVersion('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql'));
+ debug_report_bug(__FILE__, __LINE__, 'ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . getExtensionVersion('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql'));
}
// Prepare array for the template
}
} else {
// Unknown action
- debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, true)));
+ debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, true)));
}
// Update query
if (isFormSent()) {
// @TODO Check if category does already exist
- debug_report_bug('Unfinished area!');
+ debug_report_bug(__FILE__, __LINE__, 'Unfinished area!');
} else {
// Display form
loadTemplate('admin_add_guestnl_cat');
// Load user's data
if (!fetchUserData($userid)) {
// Abort here because it is not valid!
- debug_report_bug('No user account ' . $userid . ' found.');
+ debug_report_bug(__FILE__, __LINE__, 'No user account ' . $userid . ' found.');
} // END - if
if ((getRequestParameter('do') == 'accept') && (!empty(getUserData('email')))) {
} // END - foreach
} else {
// Unknown action performed
- debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), true)));
+ debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), true)));
}
// Update query
// Fetch user data
if (!fetchUserData($userid)) {
// Not found, should not happen
- debug_report_bug('User account ' . $userid . ' not found.');
+ debug_report_bug(__FILE__, __LINE__, 'User account ' . $userid . ' not found.');
} // END - if
// Load all data and add points
default:
// Unsupported mode
- debug_report_bug(sprintf("Unsupported mode <span class=\"data\">%s</span> detected.", secureString(getRequestParameter('mode'))));
+ debug_report_bug(__FILE__, __LINE__, sprintf("Unsupported mode <span class=\"data\">%s</span> detected.", secureString(getRequestParameter('mode'))));
break;
}
// Don't look for invalid userids...
if ($userid < 1) {
// Invalid, so abort here
- debug_report_bug('User id ' . $userid . ' is invalid.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'User id ' . $userid . ' is invalid.');
} elseif (isUserDataValid()) {
// Use cache, so it is fine
return true;
$OUT = loadTemplate(($mode . '_receive_table'), true, $OUT);
} else {
// Maybe the admin has to setup some maximum values?
- debug_report_bug('Nothing is being done here?');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Nothing is being done here?');
}
// Free result
} // END - foreach
} else {
// Problem in request
- debug_report_bug('Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name));
+ debug_report_bug(__FUNCTION__, __LINE__, 'Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name));
}
} else {
// Data from database
// Invalid request reply?
if (!isset($version[11])) {
// Cannot continue here
- debug_report_bug('Invalid response from check-updates3.php, count should be 10+, is ' . count($version));
+ debug_report_bug(__FUNCTION__, __LINE__, 'Invalid response from check-updates3.php, count should be 10+, is ' . count($version));
} // END - if
// Prepare content
break;
default: // Invalid mode!
- debug_report_bug(sprintf("Invalid css_php value %s detected.", getConfig('css_php')));
+ debug_report_bug(__FILE__, __LINE__, sprintf("Invalid css_php value %s detected.", getConfig('css_php')));
break;
} // END - switch
} // END - if
}
} else {
// Write it with fopen
- $fp = fopen($FQFN, 'w') or app_die(__FUNCTION__, __LINE__, "Cannot write file ".basename($FQFN).'!');
+ $fp = fopen($FQFN, 'w') or debug_report_bug(__FUNCTION__, __LINE__, 'Cannot write to file ' . basename($FQFN) . '!');
// Aquire lock
if ($aquireLock === true) flock($fp, LOCK_EX);
debug_report_bug(__FUNCTION__ . ': No arrays provided!');
} elseif (!is_array($array1)) {
// Left one is not an array
- debug_report_bug(sprintf("[%s:%s] array1 is not an array. array != %s", __FUNCTION__, __LINE__, gettype($array1)));
+ debug_report_bug(__FILE__, __LINE__, sprintf("array1 is not an array. array != %s", gettype($array1)));
} elseif (!is_array($array2)) {
// Right one is not an array
- debug_report_bug(sprintf("[%s:%s] array2 is not an array. array != %s", __FUNCTION__, __LINE__, gettype($array2)));
+ debug_report_bug(__FILE__, __LINE__, sprintf("array2 is not an array. array != %s", gettype($array2)));
}
// Merge all together
// Is the source file there?
if (!isFileReadable($source)) {
// Then abort here
- debug_report_bug('Cannot read from source file ' . basename($source) . '.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot read from source file ' . basename($source) . '.');
} // END - if
// Is the target directory there?
if (!isDirectory(dirname($dest))) {
// Then abort here
- debug_report_bug('Cannot find directory ' . str_replace(getConfig('PATH'), '', dirname($dest)) . '.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot find directory ' . str_replace(getConfig('PATH'), '', dirname($dest)) . '.');
} // END - if
// Now try to copy it
if (!copy($source, $dest)) {
// Something went wrong
- debug_report_bug('copy() has failed to copy the file.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'copy() has failed to copy the file.');
} else {
// Reset cache
$GLOBALS['file_readable'][$dest] = true;
// Is the header already sent?
if (headers_sent()) {
// Then abort here
- debug_report_bug('Headers already sent!');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Headers already sent!');
} // END - if
// Flush all headers if found
// Is the file/directory there?
if ((!isFileReadable($FQFN)) && (!isDirectory($FQFN))) {
// Neither, so abort here
- debug_report_bug('Cannot chmod() on ' . basename($FQFN) . '.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot chmod() on ' . basename($FQFN) . '.');
} // END - if
// Try to set them
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Output backtrace
- debug_report_bug('what is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'what is empty.');
} // END - if
// Return it
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Output backtrace
- debug_report_bug('action is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'action is empty.');
} // END - if
// Return it
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Output backtrace
- debug_report_bug('module is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'module is empty.');
} // END - if
// Return it
// Should we abort here?
if (($strict === true) && ($isset === false)) {
// Output backtrace
- debug_report_bug('output_mode is empty.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'output_mode is empty.');
} // END - if
// Return it
* 14.:js.php:57, require(1)
*/
if (!isset($GLOBALS['cache_array']['admin'])) {
- debug_report_bug('Cache not set.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cache not set.');
} // END - if
// Check for admin hash
// Userid must be set before it can be used
if (!isCurrentUserIdSet()) {
// Not set
- debug_report_bug('User id is not set.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'User id is not set.');
} // END - if
// Return the userid
break;
default: // Invalid mail type
- debug_report_bug('Invalid mail type ' . $ltype . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
break;
} // END - switch
break;
default: // Invalid mail type
- debug_report_bug('Invalid mail type ' . $ltype . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Invalid mail type ' . $ltype . ' detected.');
break;
}
break;
default: // Unknown type
- debug_report_bug('Unknown mail type ' . $ltype . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Unknown mail type ' . $ltype . ' detected.');
break;
}
break;
default: // Unknown type
- debug_report_bug('Unknown mail type ' . $ltype . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Unknown mail type ' . $ltype . ' detected.');
break;
}
break;
default: // Unknown type
- debug_report_bug('Unknown mail type ' . $ltype . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Unknown mail type ' . $ltype . ' detected.');
break;
} // END - switch
loadTemplate($templ, false, $content);
} else {
// Cannot confirm!
- debug_report_bug('No code given.');
+ debug_report_bug(__FILE__, __LINE__, 'No code given.');
}
break;
break;
default: // Unknown mode
- debug_report_bug('Unknown mode ' . $mode . ' detected.');
+ debug_report_bug(__FILE__, __LINE__, 'Unknown mode ' . $mode . ' detected.');
break;
} // END - switch
} else {