From: Anatol Belski Date: Wed, 26 Jul 2017 11:21:20 +0000 (+0200) Subject: Merge branch 'PHP-7.1' into PHP-7.2 X-Git-Tag: php-7.2.0beta2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ff48011593bb841fbc6c98878d4a177aa24b964;p=php Merge branch 'PHP-7.1' into PHP-7.2 * PHP-7.1: Fixed bug #74833, SID constant created with wrong module number --- 9ff48011593bb841fbc6c98878d4a177aa24b964 diff --cc ext/session/session.c index f359c1faf9,fa392dd3bc..2ae78bdf06 --- a/ext/session/session.c +++ b/ext/session/session.c @@@ -94,17 -94,14 +94,20 @@@ zend_class_entry *php_session_update_ti return FAILURE; \ } +#define SESSION_CHECK_OUTPUT_STATE \ + if (SG(headers_sent) && stage != ZEND_INI_STAGE_DEACTIVATE) { \ + php_error_docref(NULL, E_WARNING, "Headers already sent. You cannot change the session module's ini settings at this time"); \ + return FAILURE; \ + } + #define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies)) -static void php_session_send_cookie(void); -static void php_session_abort(void); +static int php_session_send_cookie(void); +static int php_session_abort(void); + /* Initialized in MINIT, readonly otherwise. */ + static int my_module_number = 0; + /* Dispatched by RINIT and by php_session_destroy */ static inline void php_rinit_session_globals(void) /* {{{ */ {