Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/static method getCanonicalID should not be called dynamically #4544

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions framework/i18n/CLocale.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public function getPluralRules()
public function getLanguageID($id)
{
// normalize id
$id = $this->getCanonicalID($id);
$id = self::getCanonicalID($id);
// remove sub tags
if(($underscorePosition=strpos($id, '_'))!== false)
{
Expand All @@ -349,7 +349,7 @@ public function getLanguageID($id)
public function getScriptID($id)
{
// normalize id
$id = $this->getCanonicalID($id);
$id = self::getCanonicalID($id);
// find sub tags
if(($underscorePosition=strpos($id, '_'))!==false)
{
Expand Down Expand Up @@ -381,7 +381,7 @@ public function getScriptID($id)
public function getTerritoryID($id)
{
// normalize id
$id = $this->getCanonicalID($id);
$id = self::getCanonicalID($id);
// find sub tags
if (($underscorePosition=strpos($id, '_'))!== false)
{
Expand Down Expand Up @@ -417,7 +417,7 @@ public function getTerritoryID($id)
*/
public function getLocaleDisplayName($id=null, $category='languages')
{
$id = $this->getCanonicalID((string)$id);
$id = self::getCanonicalID((string)$id);
if (($category == 'languages') && (isset($this->_data[$category][$id])))
{
return $this->_data[$category][$id];
Expand Down