From: Stanislav Malyshev Date: Sun, 10 May 2009 19:10:36 +0000 (+0000) Subject: little errors cleanup X-Git-Tag: php-5.3.0RC3~301 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cb1c2797f76cb0c980161e787c137da984d8612;p=php little errors cleanup --- 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 ); } /* }}} */