diff options
| author | Aaron Piotrowski <aaron@trowski.com> | 2016-06-11 12:07:28 -0500 |
|---|---|---|
| committer | Aaron Piotrowski <aaron@trowski.com> | 2016-06-13 09:02:17 -0500 |
| commit | 771e5cc24716304dd2bf8cbd8aec11d465965d0a (patch) | |
| tree | cf85742ca6a5810f284f62902f9dc7efc756a663 /ext/intl | |
| parent | e3c681aa5cc71122a8d2fae42e6513fc413ccac8 (diff) | |
| download | php-git-771e5cc24716304dd2bf8cbd8aec11d465965d0a.tar.gz | |
Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error
Diffstat (limited to 'ext/intl')
| -rw-r--r-- | ext/intl/idn/idn.c | 3 | ||||
| -rw-r--r-- | ext/intl/normalizer/normalizer_class.c | 2 | ||||
| -rw-r--r-- | ext/intl/transliterator/transliterator_class.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c index fed184e618..1489dab9b1 100644 --- a/ext/intl/idn/idn.c +++ b/ext/intl/idn/idn.c @@ -27,7 +27,6 @@ #include <unicode/uidna.h> #include <unicode/ustring.h> -#include "zend_exceptions.h" #include "ext/standard/php_string.h" #include "intl_error.h" @@ -166,7 +165,7 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS, RETURN_FALSE; } if (len >= 255) { - zend_throw_error(zend_ce_error, "ICU returned an unexpected length"); + zend_throw_error(NULL, "ICU returned an unexpected length"); uidna_close(uts46); zend_string_free(buffer); RETURN_FALSE; diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 93a5624663..92e4402180 100644 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -63,7 +63,7 @@ void normalizer_register_Normalizer_class( void ) /* Declare 'Normalizer' class properties. */ if( !Normalizer_ce_ptr ) { - zend_error( E_ERROR, + zend_throw_error( NULL, "Normalizer: attempt to create properties " "on a non-registered class." ); return; diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c index 96e52a15fd..07b52eb133 100644 --- a/ext/intl/transliterator/transliterator_class.c +++ b/ext/intl/transliterator/transliterator_class.c @@ -183,7 +183,7 @@ err: "Could not clone transliterator", 0 ); err_msg = intl_error_get_message( TRANSLITERATOR_ERROR_P( to_orig ) ); - zend_throw_error( zend_ce_error, "%s", ZSTR_VAL(err_msg) ); + zend_throw_error( NULL, "%s", ZSTR_VAL(err_msg) ); zend_string_free( err_msg ); /* if it's changed into a warning */ /* do not destroy tempz; we need to return something */ } |
