8000 Added comment · symfony/symfony@d3f5f3a · GitHub
[go: up one dir, main page]

Skip to content

Commit d3f5f3a

Browse files
author
Francis Besset
committed
Added comment
1 parent 773d818 commit d3f5f3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ public function fileExcerpt($file, $line)
145145
if (is_readable($file)) {
146146
if (extension_loaded('fileinfo')) {
147147
$finfo = new \Finfo();
148+
149+
// Check if the file is an application/octet-stream (eg. Phar file) because hightlight_file cannot parse these files
148150
if ('application/octet-stream' === $finfo->file($file, FILEINFO_MIME_TYPE)) {
149151
return;
150152
}

0 commit comments

Comments
 (0)
0