Skip to content

Commit 7cfa780

Browse files
authored
Merge pull request #1916 from daif/develop
Check if the value is string
2 parents a41458f + 7c0d283 commit 7cfa780

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
@@ -141,7 +141,7 @@ public function run($startTime, $totalTime, $request, $response): string
141141
foreach ($_SESSION as $key => $value)
142142
{
143143
// Replace the binary data with string to avoid json_encode failure.
144-
if (preg_match('~[^\x20-\x7E\t\r\n]~', $value))
144+
if (is_string($value) && preg_match('~[^\x20-\x7E\t\r\n]~', $value))
145145
{
146146
$value = 'binary data';
147147
}

0 commit comments

Comments
 (0)