]> granicus.if.org Git - php/commitdiff
MFH: Fixes #45406 - Patch by oleg dot grenrus at dynamoid dot com
authorKalle Sommer Nielsen <kalle@php.net>
Mon, 4 Aug 2008 06:21:55 +0000 (06:21 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Mon, 4 Aug 2008 06:21:55 +0000 (06:21 +0000)
NEWS
ext/session/session.c

diff --git a/NEWS b/NEWS
index f7cd9b8b660283d5fea296f87675fea77495e22c..64082f69821e02291635e202c77110f15649ac86 100644 (file)
--- 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 
index 0fe721079539ae07b4768c1fb9785b90bbf1c780..5543be37cbe7a4e9d86572be1e528900546e0c6a 100644 (file)
@@ -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);
        }