File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 3535php_fpm=" /etc/init.d/php$version -fpm"
3636
3737# Verify php version format
38- if [[ ! $version =~ ^[0-9]\. [0-9]+ ]]; then
38+ if [[ ! $version =~ ^[0-9]+ \. [0-9]+ ]]; then
3939 echo " The specified PHP version format is invalid, it should look like [0-9].[0-9]."
4040 echo " Example: 7.0, 7.4, 8.0"
4141 exit " $E_INVALID "
Original file line number Diff line number Diff line change @@ -36,12 +36,13 @@ send_email_report() {
3636
3737is_format_valid ' restart'
3838
39- if [[ ! $version =~ ^[0-9]\. [0-9]+ ]]; then
40- echo " The specified PHP version format is invalid, it should look like [0-9].[0-9]."
41- echo " Example: 7.0, 7.4, 8.0"
42- exit " $E_INVALID "
39+ if [ -z " $version " ]; then
40+ if [[ ! $version =~ ^[0-9]\. [0-9]+ ]]; then
41+ echo " The specified PHP version format is invalid, it should look like [0-9].[0-9]."
42+ echo " Example: 7.0, 7.4, 8.0"
43+ exit " $E_INVALID "
44+ fi
4345fi
44-
4546# ----------------------------------------------------------#
4647# Action #
4748# ----------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments