Exceptions
Exception
ErrorException
in
src/Controller/Admin/Player/VouchersController.php
(line 133)
if(!isset($mapping[$name])) {
throw new DomainException("Missing {$name} column");
}
}
// Get list of voucher groups
// Todo: don't load all voucher groups, get on need basis while discovering codes
$groups = array_reduce($client->getVoucherGroups()->toArray(), fn($result, VoucherGroup $group) => $result + [$group->getName() => $group], []);
$defaultGroup = $client->getDefaultGroup();
$line = 1;
VouchersController->getCodesFromFile()
in
src/Controller/Admin/Player/VouchersController.php
(line 79)
return $this->redirectToRoute("app_admin_player_vouchers_list", ['slug' => $slug]);
}
if($importForm->isSubmitted() && $importForm->isValid()) {
$file = $importForm->get("file")->getData();
try {
$codes = $this->getCodesFromFile($player, $client, $file);
$this->voucherRepo->importVouchers($player, $this->getUser(), $codes);
$this->addFlash('success', count($codes)." voucher(s) imported");
return $this->redirectToRoute("app_admin_player_vouchers_list", ['slug' => $slug]);
} catch(DomainException $ex) {
in
vendor/symfony/http-kernel/HttpKernel.php
->
list
(line 152)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$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 74)
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
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;
}
}
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Logs
Level | Channel | Message |
---|---|---|
INFO 00:58:51 | request |
Matched route "_profiler". { "route": "_profiler", "route_parameters": { "_route": "_profiler", "_controller": "web_profiler.controller.profiler::panelAction", "token": "eee174" }, "request_uri": "https://dashboard.dev-omnilive.arcplex.fr/_profiler/eee174?panel=exception", "method": "GET" } |
Stack Trace
ErrorException
|
---|
ErrorException: Warning: array_reduce() expects parameter 1 to be array, object given at src/Controller/Admin/Player/VouchersController.php:133 at App\Controller\Admin\Player\VouchersController->getCodesFromFile() (src/Controller/Admin/Player/VouchersController.php:79) at App\Controller\Admin\Player\VouchersController->list() (vendor/symfony/http-kernel/HttpKernel.php:152) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:27) |