diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php index 93d99f936c74..01df2ffca707 100644 --- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -35,7 +35,15 @@ class CodeExtension extends \Twig_Extension */ public function __construct($fileLinkFormat, $rootDir, $charset) { - $this->fileLinkFormat = empty($fileLinkFormat) ? ini_get('xdebug.file_link_format') : $fileLinkFormat; + if (empty($fileLinkFormat)) { + $fileLinkFormat = ini_get('xdebug.file_link_format'); + + if (empty($fileLinkFormat)) { + $fileLinkFormat = get_cfg_var('xdebug.file_link_format'); + } + } + + $this->fileLinkFormat = $fileLinkFormat; $this->rootDir = str_replace('\\', '/', dirname($rootDir)).'/'; $this->charset = $charset; } diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index f6ec8ddfb3f9..fb1ad9306f79 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -349,7 +349,7 @@ private function formatPath($path, $line) $path = self::utf8Htmlize($path); $file = preg_match('#[^/\\\\]*$#', $path, $file) ? $file[0] : $path; - if ($linkFormat = ini_get('xdebug.file_link_format')) { + if (($linkFormat = ini_get('xdebug.file_link_format')) || ($linkFormat = get_cfg_var('xdebug.file_link_format'))) { $link = str_replace(array('%f', '%l'), array($path, $line), $linkFormat); return sprintf(' in %s line %d', $link, $file, $line);