diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 98a5bb6db6a..f8cb91ef8ef 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4148,7 +4148,7 @@ PHP_FUNCTION(putenv) Obviously the CRT version will be useful more often. But generally, doing both brings us on the safe track at least in NTS build. */ - && _putenv(pe.putenv_string) == 0 + && _putenv_s(pe.key, value ? value : "") == 0 # endif ) { /* success */ # endif