Skip to content

Commit 80ced73

Browse files
authored
Unserialize cache data
1 parent 4355550 commit 80ced73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/DataCollector/CacheCollector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public function onCacheEvent(CacheEvent $event)
3939

4040
if (isset($params['value'])) {
4141
if ($this->collectValues) {
42-
$params['value'] = htmlspecialchars($this->getDataFormatter()->formatVar($event->value));
42+
if (is_string($params['value'])) {
43+
$params['value'] = @unserialize($params['value']) ?: $params['value'];
44+
}
45+
46+
$params['value'] = htmlspecialchars($this->getDataFormatter()->formatVar($params['value']));
4347
} else {
4448
unset($params['value']);
4549
}

0 commit comments

Comments
 (0)