Ошибка 500

Call to a member function hasAttribute() on null