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:
commit
c7a5902a20
|
@ -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());
|
||||
}
|
||||
|
|
Reference in New Issue