Skip to content

Commit eb7dd12

Browse files
[FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()
1 parent f0815c8 commit eb7dd12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Templating/Helper/CodeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function __construct($fileLinkFormat, $rootDir, $charset)
3636
$fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
3737
if ($fileLinkFormat && !is_array($fileLinkFormat)) {
3838
$i = max(strpos($fileLinkFormat, '%f'), strpos($fileLinkFormat, '%l'));
39-
$i = strpos($fileLinkFormat, '#', $i) ?: strlen($fileLinkFormat);
39+
$i = strpos($fileLinkFormat, '#"', $i) ?: strlen($fileLinkFormat);
4040
$fileLinkFormat = array(substr($fileLinkFormat, 0, $i), substr($fileLinkFormat, $i + 1));
41-
parse_str($fileLinkFormat[1], $fileLinkFormat[1]);
41+
$fileLinkFormat[1] = @json_decode('{'.$fileLinkFormat[1].'}', true) ?: array();
4242
}
4343
$this->fileLinkFormat = $fileLinkFormat;
4444
$this->rootDir = str_replace('\\', '/', $rootDir).'/';

0 commit comments

Comments
 (0)