Initialize properties as arrays so the foreach doesn't break

The foreach loops around line 144 break when some properties are not defined and stay NULL instead of an array, which triggers a PHP warning.
Merge pull request #1 from hostnet/fix-foreach-arrays

Initialize properties as arrays so the foreach doesn't break