From: Antony Dovgal Date: Wed, 30 Aug 2006 16:24:40 +0000 (+0000) Subject: change ini handlers to produce E_ERROR if they are called during startup X-Git-Tag: php-5.2.0RC3~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6ced95187cf66df46e4c0ff7cdb661b296f6a2c;p=php change ini handlers to produce E_ERROR if they are called during startup --- diff --git a/ext/session/session.c b/ext/session/session.c index a4eb7af687..3078cff9fc 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -101,7 +101,13 @@ static PHP_INI_MH(OnUpdateSaveHandler) 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 @@ static PHP_INI_MH(OnUpdateSerializer) 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;