]> granicus.if.org Git - php/commitdiff
Add an error message to the ini handlers
authorSascha Schumann <sas@php.net>
Wed, 20 Nov 2002 17:15:00 +0000 (17:15 +0000)
committerSascha Schumann <sas@php.net>
Wed, 20 Nov 2002 17:15:00 +0000 (17:15 +0000)
ext/session/session.c

index f9b686da6ade0aa4060f60053950411df58b856c..dc3b9c8e5cfb67ddc6f5525a9452b4e2f5798edf 100644 (file)
@@ -85,8 +85,10 @@ static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
 
 static PHP_INI_MH(OnUpdateSaveHandler)
 {
-       if (PS(session_status) == php_session_active)
-               return;
+       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
@@ -104,8 +106,10 @@ static PHP_INI_MH(OnUpdateSaveHandler)
 
 static PHP_INI_MH(OnUpdateSerializer)
 {
-       if (PS(session_status) == php_session_active)
-               return;
+       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