@@ -665,7 +665,8 @@ RUN if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; \
665
665
"dynCall_viiiii",\
666
666
"dynCall_viiiiiii",\
667
667
"dynCall_viiiiiiii",' ; \
668
- export ASYNCIFY_ONLY=$'"zif_array_filter",\" __fwritex",\
668
+ export ASYNCIFY_ONLY=$'"zif_array_filter",\
669
+ "__fwritex",\
669
670
"zif_sleep",\
670
671
"zif_stream_get_contents",\
671
672
"php_stdiop_read",\
@@ -970,7 +971,7 @@ RUN if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; \
970
971
if [ "${PHP_VERSION:0:1}" -lt "8" ]; then \
971
972
export ASYNCIFY_ONLY="$ASYNCIFY_ONLY," $(echo "$ASYNCIFY_ONLY" | sed -E $'s/"([a-zA-Z])/"byn$fpcast-emu$\\ 1/g' ); \
972
973
fi; \
973
- echo -n ' -s ASYNCIFY_ONLY=[' $ASYNCIFY_ONLY_UNPREFIXED$ASYNCIFY_ONLY'] ' | tr -d "\n " >> /root/.emcc-php-wasm-flags; \
974
+ echo -n ' -s ASYNCIFY_ONLY=[' $ASYNCIFY_ONLY_UNPREFIXED$ASYNCIFY_ONLY'] ' | tr -d "\n " >> /root/.emcc-php-wasm-flags; \
974
975
fi;
975
976
976
977
# Build the final .wasm file
@@ -1143,7 +1144,7 @@ RUN set -euxo pipefail; \
1143
1144
# Make the php.wasm URL configurable via the dependencyFilename loader argument:
1144
1145
/root/replace.sh $'s/["\' ]php\. wasm[\' "]/dependencyFilename/g' /root/output/php.js; \
1145
1146
# Patch a "property undefined" error
1146
- # Emscripten produces an if that checkes a stream.stream_ops.poll property. However,
1147
+ # Emscripten produces an if that checks a stream.stream_ops.poll property. However,
1147
1148
# stream.stream_ops is sometimes undefined and the check fails. Let's adjust it to
1148
1149
# tolerate a null stream.stream_ops value.
1149
1150
/root/replace.sh "s/if\s *\( stream\. stream_ops\. poll\) /if (stream.stream_ops?.poll)/g" /root/output/php.js; \
@@ -1155,10 +1156,12 @@ RUN set -euxo pipefail; \
1155
1156
/root/replace.sh $'s/if\s *\(\s *["\' ]string["\' ]\s *===\s *typeof Module\[ ["\' ]websocket["\' ]\]\[ ["\' ]url["\' ]\]\s *\) /if("function"===typeof Module["websocket"]["url"]) {\n url = Module["websocket"]["url"](...arguments);\n }else if ("string" === typeof Module["websocket"]["url"])/g' \
1156
1157
/root/output/php.js; \
1157
1158
# Enable custom WebSocket constructors to support socket options.
1158
- /root/replace.sh "s/ws\s *=\s *new WebSocketConstructor/if (Module['websocket']['decorator']) {WebSocketConstructor = Module['websocket']['decorator'](WebSocketConstructor);}ws = new WebSocketConstructor/g" /root/output/php.js; \
1159
+ /root/replace.sh "s/ws\s *=\s *new WebSocketConstructor/if (Module['websocket']['decorator']) {WebSocketConstructor = Module['websocket']['decorator'](WebSocketConstructor);}ws = new WebSocketConstructor/g" /root/output/php.js && \
1160
+ if [ "$EMSCRIPTEN_ENVIRONMENT" = "node" ]; then \
1159
1161
if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; then \
1160
1162
/root/replace.sh "s/sock\. server\s *=\s *new WebSocketServer/if (Module['websocket']['serverDecorator']) {WebSocketServer = Module['websocket']['serverDecorator'](WebSocketServer);}sock.server = new WebSocketServer/g" /root/output/php.js; \
1161
1163
fi; \
1164
+ fi; \
1162
1165
# Add MSG_PEEK flag support in recvfrom
1163
1166
#
1164
1167
# Emscripten ignores the flags argument to ___syscall_recvfrom.
0 commit comments