Skip to content

Commit 2cde0ff

Browse files
authored
Use string variables to fix /bin/sh: 1: [: Illegal number: 8.5 issue (#248)
1 parent e0e0d38 commit 2cde0ff

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

githubactions-php-apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RUN \
6565
\
6666
# Install XMLRPC PHP extension.
6767
&& apt install --assume-yes --no-install-recommends --quiet libxml2-dev \
68-
&& if [ $PHP_MAJOR_VERSION -lt "8" ]; then \
68+
&& if [ "$PHP_MAJOR_VERSION" -lt "8" ]; then \
6969
# For PHP < 8.x, install bundled extension
7070
docker-php-ext-install xmlrpc \
7171
; else \

githubactions-php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RUN \
6565
\
6666
# Install XMLRPC PHP extension.
6767
&& apt install --assume-yes --no-install-recommends --quiet libxml2-dev \
68-
&& if [ $PHP_MAJOR_VERSION -lt "8" ]; then \
68+
&& if [ "$PHP_MAJOR_VERSION" -lt "8" ]; then \
6969
# For PHP < 8.x, install bundled extension
7070
docker-php-ext-install xmlrpc \
7171
; else \

glpi-development-env/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN apt update \
5454
&& docker-php-ext-install bcmath \
5555
\
5656
# Install opcache PHP extension (it is already enabled in PHP 8.5+ images).
57-
&& if [ $PHP_MINOR_VERSION -ne "8.5" ]; then \
57+
&& if [ "$PHP_MINOR_VERSION" -ne "8.5" ]; then \
5858
docker-php-ext-install opcache \
5959
; fi \
6060
\
@@ -70,7 +70,7 @@ RUN apt update \
7070
&& docker-php-ext-install zip \
7171
\
7272
# Install xdebug PHP extension.
73-
&& if [ $PHP_MAJOR_VERSION -lt "8" ]; then \
73+
&& if [ "$PHP_MAJOR_VERSION" -lt "8" ]; then \
7474
pecl install xdebug-3.1.6 \
7575
; else \
7676
# xdebug 3.5.0 is not available on PECL, its distribution is now made through PIE
@@ -83,7 +83,7 @@ RUN apt update \
8383
\
8484
# Install XMLRPC PHP extension.
8585
&& apt install --assume-yes --no-install-recommends --quiet libxml2-dev \
86-
&& if [ $PHP_MAJOR_VERSION -lt "8" ]; then \
86+
&& if [ "$PHP_MAJOR_VERSION" -lt "8" ]; then \
8787
# For PHP < 8.x, install bundled extension
8888
docker-php-ext-install xmlrpc \
8989
; else \

glpi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ RUN apt-get update \
101101
&& docker-php-ext-install bcmath \
102102
\
103103
# Install opcache PHP extension (it is already enabled in PHP 8.5+ images).
104-
&& if [ $PHP_MINOR_VERSION -ne "8.5" ]; then \
104+
&& if [ "$PHP_MINOR_VERSION" -ne "8.5" ]; then \
105105
docker-php-ext-install opcache \
106106
; fi \
107107
\

0 commit comments

Comments
 (0)