1
0
Fork 0

Merge pull request #9537 from villfa/fix/binaries

Fix error with bin config in PHP8
pull/9555/head
Jordi Boggiano 2020-12-03 16:42:50 +01:00 committed by GitHub
commit 5a826ca14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -65,10 +65,13 @@ class ArrayLoader implements LoaderInterface
} }
if (isset($config['bin'])) { if (isset($config['bin'])) {
foreach ((array) $config['bin'] as $key => $bin) { if (!\is_array($config['bin'])) {
$config['bin'] = array($config['bin']);
}
foreach ($config['bin'] as $key => $bin) {
$config['bin'][$key] = ltrim($bin, '/'); $config['bin'][$key] = ltrim($bin, '/');
} }
$package->setBinaries((array) $config['bin']); $package->setBinaries($config['bin']);
} }
if (isset($config['installation-source'])) { if (isset($config['installation-source'])) {