From: Kalle Sommer Nielsen Date: Mon, 4 Aug 2008 06:21:55 +0000 (+0000) Subject: MFH: Fixes #45406 - Patch by oleg dot grenrus at dynamoid dot com X-Git-Tag: BEFORE_NS_RULES_CHANGE~891 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=874b45607888dd5d208883e4f966ee365ff2b2ea;p=php MFH: Fixes #45406 - Patch by oleg dot grenrus at dynamoid dot com --- diff --git a/NEWS b/NEWS index f7cd9b8b66..64082f6982 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ PHP NEWS - Fixed bug #45696 (Not all DateTime methods allow method chaining). (Derick) - Fixed bug #45545 (DateInterval has a limitation of 4 chars for ISO durations). (Derick) +- Fixed bug #45406 (session.serialize_handler declared by shared extension + fails). (Kalle, oleg dot grenrus at dynamoid dot com) - Fixed bug #44100 (Inconsistent handling of static array declarations with duplicate keys). (Dmitry) - Fixed bug #43008 (php://filter uris ignore url encoded filternames and can't diff --git a/ext/session/session.c b/ext/session/session.c index 0fe7210795..5543be37cb 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1992,14 +1992,24 @@ PHP_RINIT_FUNCTION(session) if (value) { PS(mod) = _php_find_ps_module(value TSRMLS_CC); } + } + + if (PS(serializer) == NULL) { + char *value; - if (!PS(mod)) { - /* current status is unusable */ - PS(session_status) = php_session_disabled; - return SUCCESS; + value = zend_ini_string("session.serialize_handler", sizeof("session.serialize_handler"), 0); + if(value) { + PS(serializer) = _php_find_ps_serializer(value TSRMLS_CC); } } + if (PS(mod) == NULL || PS(serializer) == NULL) { + /* current status is unusable */ + PS(session_status) = php_session_disabled; + + return SUCCESS; + } + if (PS(auto_start)) { php_session_start(TSRMLS_C); }