Show generic error when there is no error
Create an array entry before filling it
Merge pull request #4159 from owncloud/Fixing-share-sj-error

Fixing share JS error