Make sure invalid arrays return empty array instead of throwing notices.
Merge pull request #3498 from dereuromark/master-hotfix-hash

Make sure invalid arrays return empty array instead of throwing notices.