Skip to content

Commit 74484c3

Browse files
committed
Declare version array as associative
1 parent ff4e4f3 commit 74484c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/generate.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
2-
32
#
43
# Generates Dockerfiles for specified PHP versions
54
#
@@ -12,9 +11,12 @@ php_versions=( "8.1" "8.0" "7.4" "7.2" )
1211
# final source image will be generated as follow: php:7.2-cli, php:7-2-apache and php:7.2-fpm
1312
php_docker_suffix=( "cli" "apache" "fpm" )
1413

14+
# Enforce associative handling of the array to avoid arithmetic errors
15+
# May not be supported by all shells flavors or their older versions
16+
declare -A xdebug_versions
17+
1518
# Map of xdebug versions for PHP images
1619
# PHP_VERSION => XDEBUG_VERSION
17-
declare -A xdebug_versions
1820
xdebug_versions=(
1921
["8.1"]="xdebug-3.1.3"
2022
["8.0"]="xdebug-3.1.3"

0 commit comments

Comments
 (0)