From: Stanislav Malyshev Date: Tue, 7 Jul 2009 21:25:46 +0000 (+0000) Subject: merge errors support X-Git-Tag: php-5.3.1RC1~427 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e865c0b4ee31ebdb01504f886910579ba9777860;p=php merge errors support --- diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c index 44f668b195..79ae153bbe 100755 --- a/ext/intl/intl_error.c +++ b/ext/intl/intl_error.c @@ -103,6 +103,9 @@ void intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_D if( !msg ) return; + if(!err && INTL_G(error_level)) { + php_error_docref(NULL TSRMLS_CC, INTL_G(error_level), "%s", msg); + } if( !err && !( err = intl_g_error_get( TSRMLS_C ) ) ) return; diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 13f36fd03c..831ace4d58 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -454,6 +454,7 @@ zend_function_entry intl_functions[] = { /* {{{ INI Settings */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals) + STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals) PHP_INI_END() /* }}} */ diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index 92663444e0..61455b6fb7 100755 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -45,6 +45,7 @@ ZEND_BEGIN_MODULE_GLOBALS(intl) collator_compare_func_t compare_func; UBreakIterator* grapheme_iterator; intl_error g_error; + long error_level; ZEND_END_MODULE_GLOBALS(intl) /* Macro to access request-wide global variables. */