Skip to content

Commit 725679b

Browse files
authored
Merge pull request #87 from kimrow/patch-1
Fix PHP "bad substitution" issue in older Bash versions
2 parents 4ca614b + dc08bf3 commit 725679b

File tree

1 file changed

+4
-3
lines changed
  • overrides/path

1 file changed

+4
-3
lines changed

overrides/path/php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ PATH="`dirname "$0"`:$PATH"
88

99
# Strip out our PHP_INI_SCAN_DIR - if this file has been run succesfully, then it's not necessary,
1010
# and it can cause problems (since it overrides any default scan directories configured)
11-
export PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR//:`echo $HTTP_TOOLKIT_OVERRIDE_PATH/php`/}"
12-
export PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR//`echo $HTTP_TOOLKIT_OVERRIDE_PATH/php`/}"
11+
export INJECTED_PHP_INI_DIR=$HTTP_TOOLKIT_OVERRIDE_PATH/php
12+
export PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR//:$INJECTED_PHP_INI_DIR/}"
13+
export PHP_INI_SCAN_DIR="${PHP_INI_SCAN_DIR//$INJECTED_PHP_INI_DIR/}"
1314
if [ -z "$PHP_INI_SCAN_DIR" ]; then
1415
unset PHP_INI_SCAN_DIR
1516
fi
@@ -30,4 +31,4 @@ if command -v winpty >/dev/null 2>&1; then
3031
winpty "$real_php" "${PHP_ARGS[@]}"
3132
else
3233
"$real_php" "${PHP_ARGS[@]}"
33-
fi
34+
fi

0 commit comments

Comments
 (0)