[ 
https://issues.apache.org/jira/browse/CB-9409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14641050#comment-14641050
 ] 

ASF GitHub Bot commented on CB-9409:
------------------------------------

GitHub user eymorale opened a pull request:

    https://github.com/apache/cordova-plugin-globalization/pull/39

    CB-9409 check that localeIdentifier has underscore

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/eymorale/cordova-plugin-globalization CB-9409

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-globalization/pull/39.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #39
    
----
commit 56c553d9dc29339cc9f4e2ad080dcbc3dbdbf05c
Author: Edna Morales <[email protected]>
Date:   2015-07-24T20:45:26Z

    CB-9409 check that localeIdentifier has underscore

----


> getPreferredLanguage crashes with index out of range exception when 
> currentLocale does not contain an '_'
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CB-9409
>                 URL: https://issues.apache.org/jira/browse/CB-9409
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Globalization
>         Environment: iOS
>            Reporter: Edna Morales
>            Assignee: Edna Morales
>            Priority: Minor
>
> the getPreferredLanguage function assumes that the returned value of 
> [NSLocale localeIdentifier] contains an '_'. This may be true most of the 
> time, but we have ran into issues where the localeIdentifier does not contain 
> any underscores (could be due to an invalid region being returned?). In any 
> case, we need to handle gracefully when there is no underscore present to 
> avoid an index out of bounds exception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to