summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2009-07-07 21:25:46 +0000
committerStanislav Malyshev <stas@php.net>2009-07-07 21:25:46 +0000
commite865c0b4ee31ebdb01504f886910579ba9777860 (patch)
tree10dd1c4c02cd33271ae54c4ed436e67d3000ab0a
parent87f9d62861d39b4feaa1ffcbbb5eaa95b3fb71b9 (diff)
downloadphp-git-e865c0b4ee31ebdb01504f886910579ba9777860.tar.gz
merge errors support
-rwxr-xr-xext/intl/intl_error.c3
-rwxr-xr-xext/intl/php_intl.c1
-rwxr-xr-xext/intl/php_intl.h1
3 files changed, 5 insertions, 0 deletions
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. */