Skip to content

Commit 4b83afc

Browse files
committed
add isset/!empty check around $attributes before using
1 parent fdf7daf commit 4b83afc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

templates/element/request_panel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@
3232
<?php endif; ?>
3333

3434
<h4><?= __d('debug_kit', 'Attributes') ?></h4>
35-
<?= $this->Toolbar->dump($attributes); ?>
35+
<?php
36+
if (empty($attributes)):
37+
echo '<p class="info">' . __d('debug_kit', 'No attributes data.') . '</p>';
38+
else:
39+
echo $this->Toolbar->dump($attributes);
40+
endif;
41+
?>
3642

3743
<h4><?= __d('debug_kit', 'Post data') ?></h4>
3844
<?php

0 commit comments

Comments
 (0)