Ошибка 500

Trying to get property 'title' of non-object