Skip to content

Commit 44e2fd3

Browse files
authored
Merge branch 'main' into fix/always-ignore-user-abort
2 parents 26bfab4 + abba64b commit 44e2fd3

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

build-static.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ else
147147
spcCommand="./bin/spc"
148148
fi
149149

150+
# turn potentially relative EMBED path into absolute path
151+
if [ -n "${EMBED}" ]; then
152+
if [[ "${EMBED}" != /* ]]; then
153+
EMBED="${CURRENT_DIR}/${EMBED}"
154+
fi
155+
fi
156+
150157
# Extensions to build
151158
if [ -z "${PHP_EXTENSIONS}" ]; then
152159
# enable EMBED mode, first check if project has dumped extensions
@@ -178,9 +185,6 @@ fi
178185

179186
# Embed PHP app, if any
180187
if [ -n "${EMBED}" ] && [ -d "${EMBED}" ]; then
181-
if [[ "${EMBED}" != /* ]]; then
182-
EMBED="${CURRENT_DIR}/${EMBED}"
183-
fi
184188
# shellcheck disable=SC2089
185189
SPC_OPT_BUILD_ARGS="${SPC_OPT_BUILD_ARGS} --with-frankenphp-app='${EMBED}'"
186190
fi

internal/extgen/paramparser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (pp *ParameterParser) generateParamParsing(params []phpParameter, requiredC
9292
}
9393

9494
var builder strings.Builder
95-
builder.WriteString(fmt.Sprintf(" ZEND_PARSE_PARAMETERS_START(%d, %d)", requiredCount, len(params)))
95+
_, _ = fmt.Fprintf(&builder, " ZEND_PARSE_PARAMETERS_START(%d, %d)", requiredCount, len(params))
9696

9797
optionalStarted := false
9898
for _, param := range params {

internal/extgen/phpfunc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func (pfg *PHPFuncGenerator) generate(fn phpFunction) string {
1616
paramInfo := pfg.paramParser.analyzeParameters(fn.Params)
1717

1818
funcName := NamespacedName(pfg.namespace, fn.Name)
19-
builder.WriteString(fmt.Sprintf("PHP_FUNCTION(%s)\n{\n", funcName))
19+
_, _ = fmt.Fprintf(&builder, "PHP_FUNCTION(%s)\n{\n", funcName)
2020

2121
if decl := pfg.paramParser.generateParamDeclarations(fn.Params); decl != "" {
2222
builder.WriteString(decl + "\n")

0 commit comments

Comments
 (0)