Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding patch from SkieDr to fix issues with DebugKitDebugger::_output…

… and changes to Debugger::_output()
  • Loading branch information...
commit 81038a0e887b355035fd1643c5c4346910e12f92 1 parent 37511bb
@markstory markstory authored
Showing with 24 additions and 2 deletions.
  1. +24 −2 vendors/debug_kit_debugger.php
View
26 vendors/debug_kit_debugger.php
@@ -339,7 +339,22 @@ function clearMemoryPoints() {
* @param string $var Object to convert
* @access protected
*/
- function _output($level, $error, $code, $helpCode, $description, $file, $line, $kontext) {
+ function _output($level, $error = null, $code = null, $helpCode = null, $description = null, $file = null, $line = null, $kontext = null) {
+ if (is_array($level)) {
+ $error = $level['error'];
+ $code = $level['code'];
+ if (isset($helpID)) {
+ $helpCode = $level['helpID'];
+ } else {
+ $helpCode = '';
+ }
+ $description = $level['description'];
+ $file = $level['file'];
+ $line = $level['line'];
+ $kontext = $level['context'];
+ $level = $level['level'];
+ $compact = true;
+ }
$files = $this->trace(array('start' => 2, 'format' => 'points'));
$listing = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
$trace = $this->trace(array('start' => 2, 'depth' => '20'));
@@ -351,7 +366,14 @@ function _output($level, $error, $code, $helpCode, $description, $file, $line, $
if ($this->_outputFormat == 'fb') {
$this->_fireError($error, $code, $description, $file, $line, $trace, $context);
} else {
- echo parent::_output($level, $error, $code, $helpCode, $description, $file, $line, $kontext);
+ if (!empty($compact)) {
+ $result = compact('level', 'error', 'code', 'description', 'file', 'line');
+ $result['helpID'] = $helpCode;
+ $result['context'] = $kontext;
+ echo parent::_output($result);
+ } else {
+ echo parent::_output($level, $error, $code, $helpCode, $description, $file, $line, $kontext);
+ }
}
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.