Parenthesise some double ternary conditions in Asset Combiner.
Improve compatibility with PHP 7.4, where "Unparenthesized `a ? b : c ?: d` is deprecated" Fixes #4790.
This commit is contained in:
parent
18398a8318
commit
e9abdf7783
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
strategy:
|
||||
max-parallel: 6
|
||||
matrix:
|
||||
phpVersions: ['7.1', '7.2', '7.3']
|
||||
phpVersions: ['7.1', '7.2', '7.3', '7.4']
|
||||
fail-fast: false
|
||||
name: PHP ${{ matrix.phpVersions }}
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ class CombineAssets
|
|||
$filesSalt = null;
|
||||
foreach ($assets as $asset) {
|
||||
$filters = $this->getFilters(File::extension($asset)) ?: [];
|
||||
$path = file_exists($asset) ? $asset : File::symbolizePath($asset, null) ?: $this->localPath . $asset;
|
||||
$path = file_exists($asset) ? $asset : (File::symbolizePath($asset, null) ?: $this->localPath . $asset);
|
||||
$files[] = new FileAsset($path, $filters, public_path());
|
||||
$filesSalt .= $this->localPath . $asset;
|
||||
}
|
||||
|
|
@ -482,7 +482,7 @@ class CombineAssets
|
|||
$key = '';
|
||||
|
||||
$assetFiles = array_map(function ($file) {
|
||||
return file_exists($file) ? $file : File::symbolizePath($file, null) ?: $this->localPath . $file;
|
||||
return file_exists($file) ? $file : (File::symbolizePath($file, null) ?: $this->localPath . $file);
|
||||
}, $assets);
|
||||
|
||||
foreach ($assetFiles as $file) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue