@ganjo888

Error: Call to a member function?

Fatal error: Uncaught Error: Call to a member function send() on string in /var/www/app/App.php:95 Stack trace: #0 /var/www/public/index.php(10): App\App->run() #1 {main} thrown in /var/www/app/App.php on line 95

Ткните пальцем на ошибку,пожалуйста?
public function run()
    {
        $matcher = new UrlMatcher($this->routes, $this->requestContext);
        try {
            $this->request->attributes->add($matcher->match($this->request->getPathInfo()));
            $this->controller = $this->getController();
            $this->arguments = $this->getArguments($this->controller);

            $response = call_user_func($this->controller, $this->arguments);
        } catch (ResourceNotFoundException $e) {
            echo $e->getMessage();
        }


        if (!empty($response)) {
            $response->send();
        }
  • Вопрос задан
  • 1747 просмотров
Решения вопроса 1
Rsa97
@Rsa97
Для правильного вопроса надо знать половину ответа
Из call_user_func вернулась строка, а у строки нет метода send().
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы