prevent PHP notice

fixes https://github.com/owncloud/core/issues/11875

@bantu @MorrisJobke @PVince81 THX