$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
$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;
}
}