cvs: php4 /ext/session session.c
| From: | Yasuo Ohgaki | Date: | Wed, 06 Mar 2002 00:40:42 +0000 |
| Subject: | cvs: php4 /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9708@lists.php.net to get a copy of this message | ||
yohgaki Tue Mar 5 19:40:42 2002 EDT
Modified files:
/php4/ext/session session.c
Log:
Using session_save_path() after starting session is obvious error.
Riase E_NOTICE error instead of E_WARNING. Since it is valid if
user uses session_save_path() with session_module_name().
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.285 php4/ext/session/session.c:1.286
--- php4/ext/session/session.c:1.285 Tue Mar 5 19:34:57 2002
+++ php4/ext/session/session.c Tue Mar 5 19:40:42 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.285 2002/03/06 00:34:57 yohgaki Exp $ */
+/* $Id: session.c,v 1.286 2002/03/06 00:40:42 yohgaki Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1122,8 +1122,13 @@
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) == FAILURE)
WRONG_PARAM_COUNT;
- if (PS(session_status) != php_session_none)
+ if (PS(session_status) != php_session_none) {
+ php_error(E_NOTICE, "%s() cannot set session save handler functions once session is started.
"
+ "Current session save handler (%s)",
+ get_active_function_name(TSRMLS_C),
+ (PS(mod)->name ? PS(mod)->name : "none"));
RETURN_FALSE;
+ }
zend_alter_ini_entry("session.save_handler", sizeof("session.save_handler"),
"user", sizeof("user")-1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);