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
-------

3d92f987dc [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
This commit is contained in:
Jérôme Tamarelle 2022-01-12 12:20:40 +01:00
commit c7a5902a20
1 changed files with 1 additions and 2 deletions

View File

@ -99,8 +99,7 @@ EOT
{
/** @var KernelInterface $kernel */
$kernel = $this->getApplication()->getKernel();
$targetArg = rtrim($input->getArgument('target'), '/');
$targetArg = rtrim($input->getArgument('target') ?? '', '/');
if (!$targetArg) {
$targetArg = $this->getPublicDirectory($kernel->getContainer());
}