Skip to content

Commit dc08bf3

Browse files
committed
Fix PHP wrapper script in older Bash versions with intermediate var
Previously worked at least in Bash v5.2.15 but failed in v3.2.57. Now works identically in both. Must be some minor difference in shell interpolation, but this works regardless so the details aren't too important. Previous tweak here did fix the first replacement case (with :) but didn't work for the second case, where it could replace to just php//php for some reason.
1 parent e0d7586 commit dc08bf3

File tree

1 file changed

+3
-2
lines changed
  • overrides/path

1 file changed

+3
-2
lines changed

overrides/path/php

Lines changed: 3 additions & 2 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

0 commit comments

Comments
 (0)