mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 21:38:14 +01:00
commit
208a0118b1
@ -214,6 +214,13 @@ class DebugBar implements ArrayAccess
|
|||||||
foreach ($this->collectors as $name => $collector) {
|
foreach ($this->collectors as $name => $collector) {
|
||||||
$this->data[$name] = $collector->collect();
|
$this->data[$name] = $collector->collect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all invalid (non UTF-8) characters
|
||||||
|
array_walk_recursive($this->data, function(&$item){
|
||||||
|
if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) {
|
||||||
|
$item = mb_convert_encoding($item, 'UTF-8', 'UTF-8');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if ($this->storage !== null) {
|
if ($this->storage !== null) {
|
||||||
$this->storage->save($this->getCurrentRequestId(), $this->data);
|
$this->storage->save($this->getCurrentRequestId(), $this->data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user