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

Becky Gibson commented on CB-262:
---------------------------------

nulls have a special meaning in the Contact object, please check in the W3C 
spec (sorry, can't remember all the details off the top of my head ATM).  
However, I do agree that it shouldn't crash when you provide bad input so will 
look into it for 1.6.
                
> deviceContact.save() seems to crash with empty Arrays for specific fields.
> --------------------------------------------------------------------------
>
>                 Key: CB-262
>                 URL: https://issues.apache.org/jira/browse/CB-262
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: IOS5 XCODE4.3
>            Reporter: Olivier Louvignes
>            Assignee: Shazron Abdullah
>            Priority: Critical
>              Labels: contacts, crash, ios
>
> Tried to avoid any null parameters in the deviceContact returned from 
> navigator.contacts.find() operation.
> So i used :
>                               // Force arrays
>                               if(!deviceContact.phoneNumbers) 
> deviceContact.phoneNumbers = [];
>                               if(!deviceContact.emails) deviceContact.emails 
> = [];
>                               if(!deviceContact.addresses) 
> deviceContact.addresses = [];
>                               if(!deviceContact.urls) deviceContact.urls = [];
>                               if(!deviceContact.organizations) 
> deviceContact.organizations = [];
>                               if(!deviceContact.ims) deviceContact.ims = [];
> However this does make PG crash on the next save.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to