- //$fp = fopen(PATH."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
- //fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
- //fclose($fp);
- @eval($eval);
- if (empty($query)) {
- print "eval=".htmlentities($eval)."<pre>";
- debug_print_backtrace();
- die("</pre>");
- }
+ //* DEBUG: */ $fp = fopen(PATH."inc/cache/escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
+ //* DEBUG: */ fwrite($fp, $file."(".$line."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
+ //* DEBUG: */ fclose($fp);
+
+ // Run the code
+ eval($eval);
+
+ // Was the eval() command fine?
+ if ($query == "failed") {
+ // Something went wrong?
+ printf("eval=%s\n<pre>%s</pre>",
+ htmlentities($eval),
+ debug_get_printable_backtrace()
+ );
+
+ // Abort further code executions
+ exit;
+ } // END - if
+