|
|
@@ -536,7 +536,7 @@ class Route_Debug extends RouteBase {
|
|
|
UI::h('details', [], [
|
|
|
UI::h('summary', [], [
|
|
|
( ( $dbg['msg'] && 'sql' !== $dbg['msg'] ) ? "{$dbg['msg']} " : '' ),
|
|
|
- UI::h('span', [ 'style' => "color:silver" ], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 100)) . ' ...'),
|
|
|
+ UI::h('span', [ 'style' => "color:silver" ], str_replace(array('\n', '\t'), ' ', substr(htmlspecialchars(json_encode($dbg['log'])), 0, 140)) . ' ...'),
|
|
|
" (rozwiń)"
|
|
|
]),
|
|
|
UI::h('pre', [ 'style' => "font-size:x-small" ], htmlspecialchars( ('sql' == $dbg['type'] && is_string($dbg['log'])) ? $dbg['log'] : var_export($dbg['log'], true) )),
|
|
|
@@ -585,19 +585,23 @@ class Route_Debug extends RouteBase {
|
|
|
'msg' => "TODO: ... ret({$ret}) lines(".count($contentLines).") ",
|
|
|
'type' => "error",
|
|
|
'body' => [
|
|
|
- 'rows' => array_map(function ($line) use (&$lastTime, &$lp) {
|
|
|
- $dbg = @json_decode($line, $assoc = true);
|
|
|
- if (null == $dbg && 0 !== json_last_error()) {
|
|
|
- return [
|
|
|
- 'type' => 'decode json error',
|
|
|
- 'msg' => "Error Processing Request - Parse json error: " . json_last_error()
|
|
|
- ];
|
|
|
- }
|
|
|
- $ret = $this->viewDebugRow($dbg, $lastTime);
|
|
|
- $ret['lp'] = $lp++;
|
|
|
- $lastTime = $dbg['date'];
|
|
|
- return $ret;
|
|
|
- }, $contentLines),
|
|
|
+ 'rows' => array_filter(
|
|
|
+ array_map(function ($line) use (&$lastTime, &$lp) {
|
|
|
+ if (empty($line)) return null;
|
|
|
+ $dbg = @json_decode($line, $assoc = true);
|
|
|
+ if (null == $dbg && 0 !== json_last_error()) {
|
|
|
+ return [
|
|
|
+ 'type' => 'decode json error',
|
|
|
+ 'msg' => "Error Processing Request - Parse json error: " . json_last_error()
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $ret = $this->viewDebugRow($dbg, $lastTime);
|
|
|
+ $ret['lp'] = $lp++;
|
|
|
+ $lastTime = $dbg['date'];
|
|
|
+ return $ret;
|
|
|
+ }, $contentLines)
|
|
|
+ , function ($line) { return null !== $line; }
|
|
|
+ ),
|
|
|
'fetchMoreLink' =>
|
|
|
($hasMoreRows)
|
|
|
? UI::h('div', [], [
|