tony2001                Wed Aug 30 16:24:31 2006 UTC

  Modified files:              
    /php-src/ext/session        session.c 
  Log:
  change ini handlers to produce E_ERROR if they are called during startup or 
per request
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.448&r2=1.449&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.448 php-src/ext/session/session.c:1.449
--- php-src/ext/session/session.c:1.448 Wed Aug 30 15:42:40 2006
+++ php-src/ext/session/session.c       Wed Aug 30 16:24:31 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.448 2006/08/30 15:42:40 tony2001 Exp $ */
+/* $Id: session.c,v 1.449 2006/08/30 16:24:31 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -98,7 +98,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, E_ERROR, "Cannot find save 
handler %s", new_value);
                return FAILURE;
        }
        PS(mod) = tmp;
@@ -127,7 +133,13 @@
        tmp = _php_find_ps_serializer(new_value TSRMLS_CC);
 
        if (PG(modules_activated) && !tmp) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "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

Reply via email to