Exceptions
Exception
TypeError
in
src/Library/TelegramBot/TelegramObject/Update.php
(line 39)
/*** @var CallbackQuery|null*/private $callbackQuery = null;public function __construct(array $data){parent::__construct($data);$this->setMessage($this->createTelegramObjectByKey("message", Message::class));$this->setCallbackQuery($this->createTelegramObjectByKey("callback_query", CallbackQuery::class));}
Update->__construct()
in
src/Controller/TelegramBot/CandidatesPhotoTelegramBotController.php
(line 14)
class CandidatesPhotoTelegramBotController{function webhook(Request $request, CandidatesPhotoTelegramBot $telegramBot) {$post = json_decode($request->getContent(), true);$update = new Update($post);$telegramBot->handleUpdate($update);return new Response();}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
webhook
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);try {return $this->handleRaw($request, $type);} catch (\Exception $e) {if ($e instanceof RequestExceptionInterface) {$e = new BadRequestHttpException($e->getMessage(), $e);}if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;}public function run(): int{$response = $this->kernel->handle($this->request);$response->send();if ($this->kernel instanceof TerminableInterface) {$this->kernel->terminate($this->request, $response);}
in
vendor/autoload_runtime.php
->
run
(line 35)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/home/sariato/www/dev.centr.sariato.ru/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 04:39:12 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "latest"
},
"request_uri": "https://dev.centr.sariato.ru/_profiler/latest?ip=216.73.216.248",
"method": "GET"
}
|
Stack Trace
|
TypeError
|
|---|
TypeError:
App\Library\TelegramBot\TelegramObject\Update::__construct(): Argument #1 ($data) must be of type array, null given, called in /home/sariato/www/dev.centr.sariato.ru/src/Controller/TelegramBot/CandidatesPhotoTelegramBotController.php on line 14
at src/Library/TelegramBot/TelegramObject/Update.php:39
at App\Library\TelegramBot\TelegramObject\Update->__construct()
(src/Controller/TelegramBot/CandidatesPhotoTelegramBotController.php:14)
at App\Controller\TelegramBot\CandidatesPhotoTelegramBotController->webhook()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:75)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:35)
at require_once('/home/sariato/www/dev.centr.sariato.ru/vendor/autoload_runtime.php')
(public/index.php:5)
|