summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_class.h
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
committerDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
commite5bfcd340a8e6aa9e46bef43894c78c06e80a3c8 (patch)
tree7e11e961bd43b1eb3af7149ce8af8b03d7f4ac2c /ext/intl/msgformat/msgformat_class.h
parent0a2833bbefd803a63014429973b14839718975e2 (diff)
parent13bcf685cb0a92e502ebe39f4b22c64304a9f333 (diff)
downloadphp-git-e5bfcd340a8e6aa9e46bef43894c78c06e80a3c8.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'ext/intl/msgformat/msgformat_class.h')
-rw-r--r--[-rwxr-xr-x]ext/intl/msgformat/msgformat_class.h10
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 100755..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