Corrects PHP Warnings

When using the addContact() function, you always get the following warnings:
PHP Warning: Invalid argument supplied for foreach() in [...path...]/Contact.php on line 160
PHP Warning: Invalid argument supplied for foreach() in [...path...]/Contact.php on line 164
PHP Warning: Invalid argument supplied for foreach() in [...path...]/Contact.php on line 174

This patch corrects these warnings that are due to foreach() being applied to an uninitialized array element.