php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77884 BC Break. locale_parse('root') return empty result after patch update
Submitted: 2019-04-12 18:10 UTC Modified: 2019-04-12 18:23 UTC
From: tsykun314 at gmail dot com Assigned:
Status: Not a bug Package: intl (PECL)
PHP Version: 7.1.28 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tsykun314 at gmail dot com
New email:
PHP Version: OS:

 

 [2019-04-12 18:10 UTC] tsykun314 at gmail dot com
Description:
------------
After update php version 7.1.26 => 7.1.28 the function locale_parse can return empty result. This BC affects on symfony/intl https://github.com/symfony/symfony/blob/v3.4.24/src/Symfony/Component/Intl/Locale.php#L71 and leads to errors in the application.


PHP 7.1.28-1+ubuntu18.04.1+deb.sury.org+3 (cli) (built: Apr 10 2019 10:50:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.28-1+ubuntu18.04.1+deb.sury.org+3, Copyright (c) 1999-2018, by Zend Technologies

----
Internationalization support => enabled
version => 1.1.0
ICU version => 64.1
ICU Data version => 64.1


Expected result:
----------------
php -r "print_r(locale_parse('root'));"
Array
(
    [language] => root
)

php -version
PHP 7.1.26-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 11 2019 14:13:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.26-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies


Actual result:
--------------
php -r "print_r(locale_parse('root'));"
Array
(
)

php -version
PHP 7.1.28-1+ubuntu18.04.1+deb.sury.org+3 (cli) (built: Apr 10 2019 10:50:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.28-1+ubuntu18.04.1+deb.sury.org+3, Copyright (c) 1999-2018, by Zend Technologies


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-04-12 18:23 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: *Languages/Translation +Package: intl
 [2019-04-12 18:23 UTC] requinix@php.net
libicu 64.1 is responsible for this change:

http://site.icu-project.org/download/64
> Migration Issues
> 1. The locale ID handling for "", "und" and "root" has been made consistent
> across Java, C++, and C. In particular, Locale.getLanguage() will return the
> empty string for each of these now, Locale("und_IN").getName() will be "_IN"
> for consistency, etc. This might require some adjustments.
 [2019-04-12 18:26 UTC] spam2 at rhsoft dot net
garbage in, garbage out
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 08:01:32 2025 UTC