Skip to content

Commit 75286ec

Browse files
committed
fix handling VAR vs VAR= in putenv
using _putenv_s eliminates behavior diff in TS/NTS
1 parent 3be4e5d commit 75286ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/basic_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4148,7 +4148,7 @@ PHP_FUNCTION(putenv)
41484148
Obviously the CRT version will be useful more often. But
41494149
generally, doing both brings us on the safe track at least
41504150
in NTS build. */
4151-
&& _putenv(pe.putenv_string) == 0
4151+
&& _putenv_s(pe.key, value ? value : "") == 0
41524152
# endif
41534153
) { /* success */
41544154
# endif

0 commit comments

Comments
 (0)