check if array index ocsid is set before accessing it
Merge pull request #10472 from owncloud/fix_undefined_index_ocsid

check if array index ocsid is set before accessing it