Skip to content

Commit 51615ee

Browse files
authored
Merge pull request #4544 from apphp/master
fix/static method getCanonicalID should not be called dynamically
2 parents a283390 + 1ef054d commit 51615ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework/i18n/CLocale.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public function getPluralRules()
330330
public function getLanguageID($id)
331331
{
332332
// normalize id
333-
$id = $this->getCanonicalID($id);
333+
$id = self::getCanonicalID($id);
334334
// remove sub tags
335335
if(($underscorePosition=strpos($id, '_'))!== false)
336336
{
@@ -349,7 +349,7 @@ public function getLanguageID($id)
349349
public function getScriptID($id)
350350
{
351351
// normalize id
352-
$id = $this->getCanonicalID($id);
352+
$id = self::getCanonicalID($id);
353353
// find sub tags
354354
if(($underscorePosition=strpos($id, '_'))!==false)
355355
{
@@ -381,7 +381,7 @@ public function getScriptID($id)
381381
public function getTerritoryID($id)
382382
{
383383
// normalize id
384-
$id = $this->getCanonicalID($id);
384+
$id = self::getCanonicalID($id);
385385
// find sub tags
386386
if (($underscorePosition=strpos($id, '_'))!== false)
387387
{
@@ -417,7 +417,7 @@ public function getTerritoryID($id)
417417
*/
418418
public function getLocaleDisplayName($id=null, $category='languages')
419419
{
420-
$id = $this->getCanonicalID((string)$id);
420+
$id = self::getCanonicalID((string)$id);
421421
if (($category == 'languages') && (isset($this->_data[$category][$id])))
422422
{
423423
return $this->_data[$category][$id];

0 commit comments

Comments
 (0)