summaryrefslogtreecommitdiff
path: root/ext/intl/php_intl.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-07-24 11:58:10 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-24 11:58:10 +0200
commit27ad19c3e8d4fe61ce9c8cec9e50062acf2255c1 (patch)
tree9afc82ffc85418df984c0ca0e74d2401ecf584f4 /ext/intl/php_intl.c
parent7eec281b5ea82663bfe9ee47bcc8a4d0b9c212e8 (diff)
downloadphp-git-27ad19c3e8d4fe61ce9c8cec9e50062acf2255c1.tar.gz
Validate collator earlier during sort
Check this once before the sort, instead of on every compare. Also directly store the UCollator to make things more obvious.
Diffstat (limited to 'ext/intl/php_intl.c')
-rw-r--r--ext/intl/php_intl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index 2b0b19be9b..2b91266e7e 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -267,9 +267,7 @@ PHP_RINIT_FUNCTION( intl )
/* {{{ PHP_RSHUTDOWN_FUNCTION */
PHP_RSHUTDOWN_FUNCTION( intl )
{
- if(!Z_ISUNDEF(INTL_G(current_collator))) {
- ZVAL_UNDEF(&INTL_G(current_collator));
- }
+ INTL_G(current_collator) = NULL;
if (INTL_G(grapheme_iterator)) {
grapheme_close_global_iterator( );
INTL_G(grapheme_iterator) = NULL;