php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72658 Locale::lookup() / locale_lookup() hangs if no match found
Submitted: 2016-07-23 12:33 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: a dot schilder at gmx dot de Assigned:
Status: Closed Package: intl (PECL)
PHP Version: 7.1.0beta1 OS: Windows 10 Pro
Private report: No CVE-ID: None
 [2016-07-23 12:33 UTC] a dot schilder at gmx dot de
Description:
------------
Calling Locale::lookup() / locale_lookup() hangs if no match is found and the default locale should be returned. In PHP 7.0.9 it works as expected.

This error occurs no matter if the $canonicalize argument is true or false.

Test script:
---------------
<?php
echo Locale::lookup(['en-Latn-US', 'sl', 'sl-IT'], 'en-US', true, 'de-DE');
//echo locale_lookup(['en-Latn-US', 'sl', 'sl-IT'], 'en-US', true, 'de-DE');

Expected result:
----------------
de-DE

Actual result:
--------------
[script timeout/server error]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-25 10:51 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bd9a5b183c45604471467f894b7032bea2190982
Log: Fixed bug #72658 Locale::lookup() / locale_lookup() hangs if no match found
 [2016-07-25 10:51 UTC] ab@php.net
-Status: Open +Status: Closed
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bd9a5b183c45604471467f894b7032bea2190982
Log: Fixed bug #72658 Locale::lookup() / locale_lookup() hangs if no match found
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC