Skip to content

Commit cd451d6

Browse files
authored
Merge pull request #2088 from drsdre/debug-utf8-encoding
[9.0] Prevent malformed UTF-8 characters in debug mode.
2 parents 177b436 + f5761a4 commit cd451d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/QueryDataTable.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,13 @@ protected function globalSearch($keyword)
724724
*/
725725
protected function showDebugger(array $output)
726726
{
727-
$output['queries'] = $this->connection->getQueryLog();
727+
$query_log = $this->connection->getQueryLog();
728+
array_walk_recursive($query_log, function (&$item, $key)
729+
{
730+
$item = utf8_encode($item);
731+
});
732+
733+
$output['queries'] = $query_log;
728734
$output['input'] = $this->request->all();
729735

730736
return $output;

0 commit comments

Comments
 (0)