summaryrefslogtreecommitdiff
path: root/ext/intl
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2009-05-10 19:10:36 +0000
committerStanislav Malyshev <stas@php.net>2009-05-10 19:10:36 +0000
commit0cb1c2797f76cb0c980161e787c137da984d8612 (patch)
tree1265299e1521825b490ec87d1e19f5ef7ee13847 /ext/intl
parent7c41c86a02ff8c2f78d05c63a3278e987f8350e2 (diff)
downloadphp-git-0cb1c2797f76cb0c980161e787c137da984d8612.tar.gz
little errors cleanup
Diffstat (limited to 'ext/intl')
-rwxr-xr-xext/intl/intl_data.h2
-rwxr-xr-xext/intl/intl_error.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/ext/intl/intl_data.h b/ext/intl/intl_data.h
index 85f7d56143..66ca27ae79 100755
--- a/ext/intl/intl_data.h
+++ b/ext/intl/intl_data.h
@@ -50,7 +50,7 @@ typedef struct _intl_data {
intl_error_set_code( NULL, (err) TSRMLS_CC ); \
if( U_FAILURE((err)) ) \
{ \
- intl_errors_set_custom_msg( NULL, msg, 0 TSRMLS_CC ); \
+ intl_error_set_custom_msg( NULL, msg, 0 TSRMLS_CC ); \
RETURN_FALSE; \
}
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index 93cfe004ea..15b61a78bc 100755
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
@@ -173,7 +173,9 @@ UErrorCode intl_error_get_code( intl_error* err TSRMLS_DC )
*/
void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC )
{
- intl_error_set_code( err, code TSRMLS_CC );
+ if(err) {
+ intl_error_set_code( err, code TSRMLS_CC );
+ }
intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC );
}
/* }}} */
@@ -182,7 +184,9 @@ void intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TS
*/
void intl_errors_reset( intl_error* err TSRMLS_DC )
{
- intl_error_reset( err TSRMLS_CC );
+ if(err) {
+ intl_error_reset( err TSRMLS_CC );
+ }
intl_error_reset( NULL TSRMLS_CC );
}
/* }}} */
@@ -191,7 +195,9 @@ void intl_errors_reset( intl_error* err TSRMLS_DC )
*/
void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC )
{
- intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC );
+ if(err) {
+ intl_error_set_custom_msg( err, msg, copyMsg TSRMLS_CC );
+ }
intl_error_set_custom_msg( NULL, msg, copyMsg TSRMLS_CC );
}
/* }}} */
@@ -200,7 +206,9 @@ void intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_
*/
void intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC )
{
- intl_error_set_code( err, err_code TSRMLS_CC );
+ if(err) {
+ intl_error_set_code( err, err_code TSRMLS_CC );
+ }
intl_error_set_code( NULL, err_code TSRMLS_CC );
}
/* }}} */