Skip to content

Commit 4406087

Browse files
bug #52298 [HttpKernel] Update AbstractBundle.php, use !isset($this->path) (tacman)
This PR was merged into the 7.0 branch. Discussion ---------- [HttpKernel] Update AbstractBundle.php, use !isset($this->path) Fixes issue #52292 | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | yes | New feature? no | Deprecations?no | Issues | Fix #52292 | License | MIT Check for isset rather than accessing the property before initialization. ``` !! Error {#111 !! #message: "Typed property Symfony\Component\HttpKernel\Bundle\Bundle::$path must not be accessed before initialization" !! #code: 0 !! #file: "./vendor/symfony/http-kernel/Bundle/AbstractBundle.php" !! #line: 53 !! trace: { ``` Commits ------- c59f4c5 Update AbstractBundle.php, use !isset($this->path)
2 parents a98f6da + c59f4c5 commit 4406087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/Bundle/AbstractBundle.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getContainerExtension(): ?ExtensionInterface
5050

5151
public function getPath(): string
5252
{
53-
if (null === $this->path) {
53+
if (!isset($this->path)) {
5454
$reflected = new \ReflectionObject($this);
5555
// assume the modern directory structure by default
5656
$this->path = \dirname($reflected->getFileName(), 2);

0 commit comments

Comments
 (0)