Skip to content

Commit 392beac

Browse files
committed
fix: $_SESSION may be undefined
1 parent eea4574 commit 392beac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎system/Debug/Toolbar.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function run(float $startTime, float $totalTime, RequestInterface $reques
121121
$data['vars']['varData'][esc($heading)] = $varData;
122122
}
123123

124-
if ($_SESSION !== []) {
124+
if (isset($_SESSION)) {
125125
foreach ($_SESSION as $key => $value) {
126126
// Replace the binary data with string to avoid json_encode failure.
127127
if (is_string($value) && preg_match('~[^\x20-\x7E\t\r\n]~', $value)) {

0 commit comments

Comments
 (0)