]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/template/class_TemplateEngine.php
Account status page partly implemented, backtrace now without own saveBacktrace(...
[shipsimu.git] / inc / classes / main / template / class_TemplateEngine.php
index 2a828c0f1d62c6c3efc890e8d46a1d5a8bb47c2f..a9b45743e2a25578dcc671d7ea1a79a4e2bbe7ff 100644 (file)
@@ -1022,14 +1022,23 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                        $eval = str_replace(
                                "<%php", "\";",
                                str_replace(
-                                       "%>", "\$result .= \"", $eval
+                                       "%>", "\n\$result .= \"", $eval
                                )
                        );
 
                        // Did something change?
                        if (strlen($eval) != $eval) {
                                // Run the constructed command. This will "compile" all variables in
-                               eval($eval);
+                               @eval($eval);
+                       } // END - if
+
+                       // Goes something wrong?
+                       if (!isset($result)) {
+                               // Output eval command
+                               $this->debugOutput(sprintf("Failed eval() code: <pre>%s</pre>", $this->markupCode($eval, true)), true);
+
+                               // Output backtrace here
+                               $this->debugBacktrace();
                        } // END - if
 
                        // Set raw template data
@@ -1118,15 +1127,8 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                                $this->getTemplateType()
                        );
 
-                       if ((is_object($this->getDebugInstance())) && (method_exists($this->getDebugInstance(), 'output'))) {
-                               // Use debug output handler
-                               $this->getDebugInstance()->output($msg);
-                               die();
-                       } else {
-                               // Put directly out
-                               // DO NOT REWRITE THIS TO app_die() !!!
-                               die($msg);
-                       }
+                       // Write the problem to the world...
+                       $this->debugOutput($msg);
                        break;
                }
        }