diff options
Diffstat (limited to 'ext/intl/msgformat/msgformat_class.h')
-rw-r--r-- | ext/intl/msgformat/msgformat_class.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/intl/msgformat/msgformat_class.h b/ext/intl/msgformat/msgformat_class.h index b6b8e33226..337e04e647 100644 --- a/ext/intl/msgformat/msgformat_class.h +++ b/ext/intl/msgformat/msgformat_class.h @@ -37,7 +37,15 @@ extern zend_class_entry *MessageFormatter_ce_ptr; /* Auxiliary macros */ #define MSG_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(MessageFormatter, mfo) -#define MSG_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo) +#define MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo) +#define MSG_FORMAT_METHOD_FETCH_OBJECT \ + MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \ + if (MSG_FORMAT_OBJECT(mfo) == NULL) { \ + intl_errors_set(&mfo->mf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \ + "Found unconstructed MessageFormatter", 0 TSRMLS_CC); \ + RETURN_FALSE; \ + } + #define MSG_FORMAT_OBJECT(mfo) (mfo)->mf_data.umsgf #if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM < 48 |