Index: branches/5.1.x/core/kernel/utility/debugger.php =================================================================== diff -u -r13168 -r13394 --- branches/5.1.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 13168) +++ branches/5.1.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 13394) @@ -1,6 +1,6 @@ baseURL.'/debugger_responce.php?sid='.$this->rowSeparator.'&path='.urlencode($dbg_path); ?>'; $Debugger.EventURL = 'Factory) ? $application->HREF('dummy', '', Array ('pass' => 'm')) : ''; ?>'; IsFatalError || DBG_RAISE_ON_WARNINGS) { + if ($this->IsFatalError || (DBG_RAISE_ON_WARNINGS && $this->WarningCount)) { echo '$Debugger.Toggle();'; } if (DBG_TOOLBAR_BUTTONS) { @@ -1352,6 +1359,11 @@ $this->Data[] = Array('no' => $errno, 'str' => $errstr, 'file' => $errfile, 'line' => $errline, 'context' => $errcontext, 'debug_type' => 'error'); $this->ProfilerData['error_handling']['ends'] = memory_get_usage(); $this->profilerAddTotal('error_handling', 'error_handling'); + + if ($errorType == 'Warning') { + $this->WarningCount++; + } + if (substr($errorType, 0, 5) == 'Fatal') { $this->IsFatalError = true; // append debugger report to data in buffer & clean buffer afterwards