derick          Wed Nov 20 12:49:58 2002 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/session   session.c 
  Log:
  - MFH: Add an error message to the ini handlers
  
  
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.336 php4/ext/session/session.c:1.336.2.1
--- php4/ext/session/session.c:1.336    Thu Oct 24 06:40:48 2002
+++ php4/ext/session/session.c  Wed Nov 20 12:49:57 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.336 2002/10/24 10:40:48 sas Exp $ */
+/* $Id: session.c,v 1.336.2.1 2002/11/20 17:49:57 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -85,6 +85,10 @@
 
 static PHP_INI_MH(OnUpdateSaveHandler)
 {
+       if (PS(session_status) == php_session_active) {
+               php_error(E_WARNING, "A session is active. You cannot change the 
+session module's ini settings at this time.");
+               return FAILURE;
+       }
        PS(mod) = _php_find_ps_module(new_value TSRMLS_CC);
 /*
  * Following lines are commented out to prevent bogus error message at
@@ -102,6 +106,10 @@
 
 static PHP_INI_MH(OnUpdateSerializer)
 {
+       if (PS(session_status) == php_session_active) {
+               php_error(E_WARNING, "A session is active. You cannot change the 
+session module's ini settings at this time.");
+               return FAILURE;
+       }
        PS(serializer) = _php_find_ps_serializer(new_value TSRMLS_CC);
 /*
  * Following lines are commented out to prevent bogus error message at



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to