8000 bug #44976 [FrameworkBundle] Avoid calling rtrim(null, '/') in Assets… · symfony/symfony@c7a5902 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7a5902

Browse files
committed
bug #44976 [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand (pavol-tk, GromNaN)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT Avoid following deprecation notice: ``` php.INFO: Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated ``` Commits ------- 3d92f98 [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
2 parents c3674b4 + 3d92f98 commit c7a5902

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9999
{
100100
/** @var KernelInterface $kernel */
101101
$kernel = $this->getApplication()->getKernel();
102-
$targetArg = rtrim($input->getArgument('target'), '/');
103-
102+
$targetArg = rtrim($input->getArgument('target') ?? '', '/');
104103
if (!$targetArg) {
105104
$targetArg = $this->getPublicDirectory($kernel->getContainer());
106105
}

0 commit comments

Comments
 (0)
0