Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit dc487ce

Browse files
committed
Update NoticeDebugger.php - fix show name debug with show mode in code
1 parent 43fbb02 commit dc487ce

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

ggrachdev.debugbar/classes/general/BitrixDebugger/Debugger/NoticeDebugger.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
class NoticeDebugger extends FilterDebugger {
1313

1414
protected $log = [];
15-
15+
1616
/*
1717
* Заголовок для дебага
1818
*/
1919
protected $nameDebug = null;
20-
21-
public function name(string $name)
22-
{
20+
21+
public function name(string $name) {
2322
$this->nameDebug = $name;
2423
return $this;
2524
}
@@ -144,8 +143,8 @@ public function debug(string $typeNotice, ...$item) {
144143
}
145144

146145
public function noticeRaw(string $type, array $arLogItems) {
147-
148-
if(!empty($arLogItems)) {
146+
147+
if (!empty($arLogItems)) {
149148
foreach ($arLogItems as &$item) {
150149
$item = $this->filtrateItem($item);
151150
}
@@ -165,18 +164,18 @@ public function noticeRaw(string $type, array $arLogItems) {
165164
'line' => $db[1]['line'],
166165
'data' => $arLogItems
167166
];
168-
169-
// Сбрасываем имя
170-
$this->nameDebug = null;
171167
}
172168

173169
if (ShowModeDebuggerValidator::needShowInCode($this->getConfiguratorDebugger())) {
174170

175171
foreach ($arLogItems as $item) {
176-
echo \ggrach_highlight_data($item);
172+
echo \ggrach_highlight_data($item, true, $this->nameDebug);
177173
}
178174
}
179175

176+
// Сбрасываем имя
177+
$this->nameDebug = null;
178+
180179
return $this;
181180
}
182181

0 commit comments

Comments
 (0)