Index: branches/RC/core/kernel/utility/debugger.php =================================================================== diff -u -r10644 -r10662 --- branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 10644) +++ branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 10662) @@ -19,6 +19,13 @@ var $IsFatalError = false; /** + * Allows to track compile errors, like "stack-overflow" + * + * @var bool + */ + var $_compileError = false; + + /** * Debugger data for building report * * @var Array @@ -615,13 +622,17 @@ function highlightString($string) { - if (!(defined('DBG_USE_HIGHLIGHT') && DBG_USE_HIGHLIGHT)) { + if (!(defined('DBG_USE_HIGHLIGHT') && DBG_USE_HIGHLIGHT) || $this->_compileError) { return $string; } $string = str_replace( Array('\\', '/') , Array('_no_match_string_', '_n_m_s_'), $string); + $this->_compileError = true; // next line is possible cause of compile error $string = highlight_string('', true); + $this->_compileError = false; + $string = str_replace( Array('_no_match_string_', '_n_m_s_'), Array('\\', '/'), $string); + return preg_replace('/<\?(.*)php (.*)\?>/Us', '\\2', $string); }