Ошибка (Error): Call to a member function getFilePath() on null