summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat/dateformat_create.cpp
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2017-06-26 17:22:01 +0200
committerRemi Collet <remi@php.net>2017-06-26 17:22:01 +0200
commit85c32322acfc07628140bf631e7c52b12e6050b4 (patch)
treeae79035283e68957177407123d7d342278e021d9 /ext/intl/dateformat/dateformat_create.cpp
parent4ed8ff509001b35e0cb971a1d6a294345c5d7673 (diff)
parentcaaeb4849aa56cbbdc66ea015c11a58bd47a43ff (diff)
downloadphp-git-85c32322acfc07628140bf631e7c52b12e6050b4.tar.gz
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (24 commits) Removed EG(valid_symbol_table). Used EG(active) instead. Release temporary string reference Remove superfluous semicolons Fix tests on Windows Produce a better exception message when IntlDateFormatter constructor fails. Fix format arguments Remove unused variable op2. It is redeclared later. Fix typo Implement object type annotation Fixed bug #73173 Expose inflate_get_status() and inflate_get_read_len() functions Add more constants, improve comments, and add tests Fixed bug #73900 Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding Drop soap_hash_str_find_deref() Only compute callback name in error cases Extract zend_get_callable_name() API Move va_copy compatibility code into zend_portability.h Remove unnecessary string copy Fix FE_FETCH_* exception check ...
Diffstat (limited to 'ext/intl/dateformat/dateformat_create.cpp')
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 00a5cc593c..f08e0ed3f3 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -216,7 +216,9 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
return_value = getThis();
if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
- zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
+ zend_string *err = intl_error_get_message(NULL);
+ zend_throw_exception(IntlException_ce_ptr, ZSTR_VAL(err), intl_error_get_code(NULL));
+ zend_string_release(err);
}
}
zend_restore_error_handling(&error_handling);