]> granicus.if.org Git - php/commitdiff
merge errors support
authorStanislav Malyshev <stas@php.net>
Tue, 7 Jul 2009 21:25:46 +0000 (21:25 +0000)
committerStanislav Malyshev <stas@php.net>
Tue, 7 Jul 2009 21:25:46 +0000 (21:25 +0000)
ext/intl/intl_error.c
ext/intl/php_intl.c
ext/intl/php_intl.h

index 44f668b1959d75c9e39ce835fd64b20345d91ea2..79ae153bbee4d65dfa6c9358d578321eb1807da4 100755 (executable)
@@ -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;
 
index 13f36fd03c1bb60a9172a22af7fcca4ac0bb2bd1..831ace4d5880515d0d148328937dccdb77cae56b 100755 (executable)
@@ -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()
 /* }}} */
index 92663444e00cb00181019a022d9e48df93130760..61455b6fb7dfc8eaef74d64c009980524ee9971c 100755 (executable)
@@ -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. */