X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=f010daf758244f3a06b1538c472f104d1515ac69;hp=a1577f58a7e5b6caedd1817a0c10ae43e4f6cf49;hb=76fd13e5938a334f08e43893eb9a4ff49f72bf07;hpb=4707e8e1d5511597b3d425bca0fd5addbb6fe2a8 diff --git a/inc/functions.php b/inc/functions.php index a1577f58a7..f010daf758 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -171,7 +171,7 @@ function compileFinalOutput () { // Main compilation loop function doFinalCompilation ($code, $insertComments = true) { - // Insert comments? + // Insert comments? (Only valid with HTML templates, of course) enableTemplateHtml($insertComments); // Init counter @@ -186,7 +186,7 @@ function doFinalCompilation ($code, $insertComments = true) { // Compile it //* DEBUG: */ print '
'.htmlentities($code).'
'; $eval = '$newContent = "' . str_replace('{DQUOTE}', '"', compileCode(escapeQuotes($code))) . '";'; - //* DEBUG: */ die('
'.htmlentities($eval).'
'); + //* DEBUG: */ if ($insertComments) die('
'.linenumberCode($eval).'
'); eval($eval); //* DEBUG: */ die('
'.htmlentities($newContent).'
'); @@ -987,6 +987,9 @@ function redirectToUrl ($URL, $allowSpider = true) { // Simple probe for bots/spiders from search engines if ((isSpider()) && ($allowSpider === true)) { + // Set HTTP-Status + setHttpStatus('200 OK'); + // Set content-type here to fix a missing array element setContentType('text/html'); @@ -2499,7 +2502,7 @@ function generateErrorCodeFromUserStatus ($status='') { // Back-ported from the new ship-simu engine. :-) function debug_get_printable_backtrace () { // Init variable - $backtrace = "
    \n"; + $backtrace = '
      '; // Get and prepare backtrace for output $backtraceArray = debug_backtrace(); @@ -2507,11 +2510,11 @@ function debug_get_printable_backtrace () { if (!isset($trace['file'])) $trace['file'] = __FUNCTION__; if (!isset($trace['line'])) $trace['line'] = __LINE__; if (!isset($trace['args'])) $trace['args'] = array(); - $backtrace .= "
    1. ".basename($trace['file']).":" . $trace['line'].", " . $trace['function'].'('.count($trace['args']).")
    2. \n"; + $backtrace .= '
    3. ' . basename($trace['file']) . ':' . $trace['line'].", " . $trace['function'] . '(' . count($trace['args']) . ')
    4. '; } // END - foreach // Close it - $backtrace .= "
    \n"; + $backtrace .= '
'; // Return the backtrace return $backtrace; @@ -2563,17 +2566,17 @@ function debug_report_bug ($F, $L, $message = '', $sendEmail = true) { } // END - if // Add output - $debug .= "Please report this bug at http://bugs.mxchange.org and include the logfile from " . str_replace(getConfig('PATH'), '', getConfig('CACHE_PATH')) . "debug.log in your report (you can now attach files):
";
+	$debug .= 'Please report this bug at http://bugs.mxchange.org and include the logfile from ' . str_replace(getConfig('PATH'), '', getConfig('CACHE_PATH')) . 'debug.log in your report (you can now attach files):
';
 	$debug .= debug_get_printable_backtrace();
-	$debug .= "
\nRequest-URI: " . getRequestUri()."
\n"; - $debug .= "Thank you for finding bugs."; + $debug .= '
Request-URI: ' . getRequestUri() . '
'; + $debug .= 'Thank you for finding bugs.'; // Send an email? (e.g. not wanted for evaluation errors) if (($sendEmail === true) && (!isInstallationPhase())) { // Prepare content $content = array( - 'message' => trim($message), - 'backtrace' => trim(debug_get_mailable_backtrace()) + 'message' => trim($message), + 'backtrace' => trim(debug_get_mailable_backtrace()) ); // Send email to webmaster