10000 [HttpKernel] fix link to source generation · symfony/symfony@4a4b62b · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a4b62b

Browse files
[HttpKernel] fix link to source generation
1 parent 965ed16 commit 4a4b62b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php

Lines changed: 6 additions & 4 deletions
Origina E31F l file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function format($file, $line)
6868
*/
6969
public function __sleep(): array
7070
{
71-
$this->getFileLinkFormat();
71+
$this->fileLinkFormat = $this->getFileLinkFormat();
7272

7373
return ['fileLinkFormat'];
7474
}
@@ -87,17 +87,19 @@ public static function generateUrlFormat(UrlGeneratorInterface $router, $routeNa
8787

8888
private function getFileLinkFormat()
8989
{
90+
if ($this->fileLinkFormat) {
91+
return $this->fileLinkFormat;
92+
}
93+
9094
if ($this->requestStack && $this->baseDir && $this->urlFormat) {
9195
$request = $this->requestStack->getMasterRequest();
9296

9397
if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) {
94-
$this->fileLinkFormat = [
98+
return [
9599
$request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat,
96100
$this->baseDir.\DIRECTORY_SEPARATOR, '',
97101
];
98102
}
99103
}
100-
101-
return $this->fileLinkFormat;
102104
}
103105
}

0 commit comments

Comments
 (0)
0