os_events: verify the $variables['date_id'] is an array/string.

#3503 
I try to register with my iphone and i run with a fatal error. The problem was that i got the $variables['date_id'] as an array but i remember that some change the line because he got a string. I added a statement to check if the variable is an array or string act properly.

My iPhone screen shot:
![iphone-calendar](https://f.cloud.github.com/assets/1222368/984740/93bafffe-08a7-11e3-9df0-03f8d660d935.png)

My PC screen shot:
![os-calendar](https://f.cloud.github.com/assets/1222368/984748/c0104d20-08a7-11e3-94d9-80906944e425.png)