# This needs to be MFHed, but since it requires an API break it has to wait
# until the next minor release.
the part of haystack before or after first occurence of needle. (Johannes)
- Added possibility to check in which extension an internal function was
defined using reflection API. (Johannes)
+- Fixed bug #36630 (umask not reset at the end of the request). (Ilia)
- Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus)
{
BG(rand_is_seeded) = 0;
BG(mt_rand_is_seeded) = 0;
+ BG(umask) = -1;
BG(next) = NULL;
BG(left) = -1;
zend_hash_destroy(&BG(putenv_ht));
#endif
+ if (BG(umask) != -1) {
+ umask(BG(umask));
+ }
+
/* Check if locale was changed and change it back
to the value in startup environment */
if (BG(locale_string) != NULL) {
#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
mbstate_t mblen_state;
#endif
+
+ int umask;
} php_basic_globals;
#ifdef ZTS
oldumask = umask(077);
+ if (BG(umask) != -1) {
+ BG(umask) = oldumask;
+ }
+
if (arg_count == 0) {
umask(oldumask);
} else {
umask(Z_LVAL_PP(arg1));
}
- /* XXX we should maybe reset the umask after each request! */
-
RETURN_LONG(oldumask);
}