summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-11-20 17:15:00 +0000
committerSascha Schumann <sas@php.net>2002-11-20 17:15:00 +0000
commita257d758a5b71a0513b63360e64c38220aeab4c3 (patch)
treede60b6104bb51d218f97500d725b18adb6a22cfe /ext/session
parente9ed065afce2c496c828b3845f021e0b197d25c2 (diff)
downloadphp-git-a257d758a5b71a0513b63360e64c38220aeab4c3.tar.gz
Add an error message to the ini handlers
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/session.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index f9b686da6a..dc3b9c8e5c 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -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