Skip to content

Commit 512f8af

Browse files
Merge branch '3.4' into 4.1
* 3.4: [Routing] fix trailing slash redirection when using RedirectableUrlMatcher [PropertyAccessor] fix encoding of cache keys [WebProfiler] Detect empty file paths in file viewer fixed CS Changes for upcoming Travis' infra migration Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD [DomCrawler] exclude fields inside "template" tags Use XLIFF source rather than resname when there's no target [DoctrineBridge] catch errors while converting to db values in data collector [DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider [EventDispatcher] Unwrap wrapped listeners internally Indentation error [HttpFoundation] Fix trailing space for mime-type with parameters [HttpFoundation] Fixed absolute Request URI with default port properly parse backslashes in unquoted env vars Use intersection type when referring to ParentNodeDefinitionInterface [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
2 parents 0cd5354 + 16e8190 commit 512f8af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Extension/CodeExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function formatArgsAsText($args)
134134
*/
135135
public function fileExcerpt($file, $line, $srcContext = 3)
136136
{
137-
if (is_readable($file)) {
137+
if (is_file($file) && is_readable($file)) {
138138
// highlight_file could throw warnings
139139
// see https://bugs.php.net/bug.php?id=25725
140140
$code = @highlight_file($file, true);
@@ -157,6 +157,8 @@ public function fileExcerpt($file, $line, $srcContext = 3)
157157

158158
return '<ol start="'.max($line - $srcContext, 1).'">'.implode("\n", $lines).'</ol>';
159159
}
160+
161+
return null;
160162
}
161163

162164
/**

0 commit comments

Comments
 (0)