summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2014-12-21 19:07:19 +0100
committerOndřej Surý <ondrej@sury.org>2014-12-21 19:07:19 +0100
commit60fede4c90746ef3408ed27a15dd405b3a46a83b (patch)
tree068e6a8018345664b5d0e8d838995a4a3e97cc3d /ext/standard/basic_functions.c
parentf40f1ce174885cd0f526c003eca3fa523e0ef269 (diff)
downloadphp-upstream/5.6.4+dfsg.tar.gz
New upstream version 5.6.4+dfsgupstream/5.6.4+dfsg
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r--ext/standard/basic_functions.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index c5392760e..c6fe61dd5 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -549,12 +549,9 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, 0, 0, 1)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
- ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
- ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, more_array_and_sort_options)
+ ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_order)
+ ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, sort_flags)
+ ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, arr2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
@@ -4108,13 +4105,17 @@ PHP_FUNCTION(putenv)
if (putenv(pe.putenv_string) == 0) { /* success */
# else
error_code = SetEnvironmentVariable(pe.key, value);
-# if _MSC_VER < 1500
- /* Yet another VC6 bug, unset may return env not found */
- if (error_code != 0 ||
- (error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
-# else
- if (error_code != 0) { /* success */
-# endif
+
+ if (error_code != 0
+# ifndef ZTS
+ /* We need both SetEnvironmentVariable and _putenv here as some
+ dependency lib could use either way to read the environment.
+ 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
+# endif
+ ) { /* success */
# endif
#endif
zend_hash_add(&BG(putenv_ht), pe.key, pe.key_len + 1, (void **) &pe, sizeof(putenv_entry), NULL);