From: Anatol Belski Date: Thu, 21 May 2015 06:19:54 +0000 (+0200) Subject: fix handling VAR vs VAR= in putenv X-Git-Tag: php-5.6.10RC1~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75286ece1a57f17c568b3d531eebc94ec5046a47;p=php fix handling VAR vs VAR= in putenv using _putenv_s eliminates behavior diff in TS/NTS --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 98a5bb6db6..f8cb91ef8e 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