tony2001 Wed Aug 30 16:24:40 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/session session.c
Log:
change ini handlers to produce E_ERROR if they are called during startup
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.13&r2=1.417.2.8.2.14&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.13
php-src/ext/session/session.c:1.417.2.8.2.14
--- php-src/ext/session/session.c:1.417.2.8.2.13 Wed Aug 30 15:43:10 2006
+++ php-src/ext/session/session.c Wed Aug 30 16:24:40 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.13 2006/08/30 15:43:10 tony2001 Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.14 2006/08/30 16:24:40 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -101,7 +101,13 @@
tmp = _php_find_ps_module(new_value TSRMLS_CC);
if (PG(modules_activated) && !tmp) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot find save
handler %s", new_value);
+ int err_type;
+ if (stage == ZEND_INI_STAGE_RUNTIME) {
+ err_type = E_WARNING;
+ } else {
+ err_type = E_ERROR;
+ }
+ php_error_docref(NULL TSRMLS_CC, err_type, "Cannot find save
handler %s", new_value);
return FAILURE;
}
PS(mod) = tmp;
@@ -130,7 +136,13 @@
tmp = _php_find_ps_serializer(new_value TSRMLS_CC);
if (PG(modules_activated) && !tmp) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot find
serialization handler %s", new_value);
+ int err_type;
+ if (stage == ZEND_INI_STAGE_RUNTIME) {
+ err_type = E_WARNING;
+ } else {
+ err_type = E_ERROR;
+ }
+ php_error_docref(NULL TSRMLS_CC, err_type, "Cannot find
serialization handler %s", new_value);
return FAILURE;
}
PS(serializer) = tmp;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php