We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2029f1 + a30466d commit 208a011Copy full SHA for 208a011
src/DebugBar/DebugBar.php
@@ -214,6 +214,13 @@ public function collect()
214
foreach ($this->collectors as $name => $collector) {
215
$this->data[$name] = $collector->collect();
216
}
217
+
218
+ // Remove all invalid (non UTF-8) characters
219
+ array_walk_recursive($this->data, function(&$item){
220
+ if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) {
221
+ $item = mb_convert_encoding($item, 'UTF-8', 'UTF-8');
222
+ }
223
+ });
224
225
if ($this->storage !== null) {
226
$this->storage->save($this->getCurrentRequestId(), $this->data);
0 commit comments