Skip to content

Commit a2be32f

Browse files
Merge pull request #50 from laminas/bugfix/extension-array
Fix multi-extension handling
2 parents d34e167 + ac9d2f8 commit a2be32f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/extensions.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ set -e
88

99
function install_extensions {
1010
local PHP=$1
11-
local -a EXTENSIONS=("${@:2}")
11+
local -a EXTENSIONS=()
12+
for EXTENSION in "${@:2}"; do
13+
EXTENSIONS+=("$EXTENSION")
14+
done
1215

1316
case "$PHP" in
1417
8.1)
@@ -25,7 +28,11 @@ function install_extensions {
2528

2629
function install_packaged_extensions {
2730
local PHP=$1
28-
local -a EXTENSIONS=("${@:2}")
31+
# shellcheck disable=SC2206
32+
local -a EXTENSIONS=()
33+
for EXTENSION in "${@:2}"; do
34+
EXTENSIONS+=("$EXTENSION")
35+
done
2936
local TO_INSTALL=""
3037

3138
for EXTENSION in "${EXTENSIONS[@]}"; do
@@ -52,7 +59,8 @@ function enable_static_extension {
5259
}
5360

5461
PHP=$1
55-
declare -a EXTENSIONS=("${@:2}")
62+
# shellcheck disable=SC2206
63+
declare -a EXTENSIONS=(${@:2})
5664
# shellcheck disable=SC2196
5765
ENABLED_EXTENSIONS=$(php -m | tr '[:upper:]' '[:lower:]' | egrep -v '^[\[]' | grep -v 'zend opcache')
5866
EXTENSIONS_TO_INSTALL=()

0 commit comments

Comments
 (0)