case 1382:
case 1479:
case 1541:
case 1554:
case 1626:
return new SyntaxErrorException($exception, $query);
case 1044:
case 1045:
case 1046:
case 1049:
): DriverException {
if ($this->exceptionConverter === null) {
$this->exceptionConverter = $this->_driver->getExceptionConverter();
}
$exception = $this->exceptionConverter->convert($driverException, $query);
if ($exception instanceof ConnectionLost) {
$this->close();
}
Driver\Exception $e,
string $sql,
array $params = [],
array $types = []
): DriverException {
return $this->handleDriverException($e, new Query($sql, $params, $types));
}
/**
* @internal
*/
return new Result(
$this->stmt->execute($params),
$this->conn
);
} catch (Driver\Exception $ex) {
throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types);
} finally {
if ($logger !== null) {
$logger->stopQuery();
}
}
{
if ($params === []) {
$params = null; // Workaround as long execute() exists and used internally.
}
return $this->execute($params);
}
/**
* Executes the statement with the currently bound parameters and return affected rows.
*
$query_order = 'ORDER BY ';
$orderby[] = 'p.id DESC';
}
$order_by = join(',', $orderby);
$count = $conn->prepare("SELECT count(*) as total" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id");
$countAll = $count->executeQuery();
$sql = "SELECT p.*,m.image,m.activite_id" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id $query_order $order_by";
$stmt = $conn->prepare($sql);
$resultSet = $stmt->executeQuery();
$total = $countAll->rowCount();
$data = $resultSet->fetchAssociative();
* @Route("/{cp}/{ville}", name="app_default_city",requirements={"cp"="\d+"})
*/
public function ville(?string $cp,$ville): Response
{
$result = $this->entityManager
->getRepository(PwaEnfance::class)->findByCp($cp,$ville);
return $this->render('default/search.html.twig', [
'result' => $result['query'],
'link' => $result['link'],
'total' => $result['total'],
'totalPage' => $result['totalPage'],
$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);
{
$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) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$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);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
} else {
$code = $exception->getCode();
$sqlState = null;
}
return new self($exception->getMessage(), $sqlState, $code, $exception);
}
}
public function execute($params = null): ResultInterface
{
try {
$this->stmt->execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
return new Result($this->stmt);
}
/**
* {@inheritdoc}
*/
public function execute($params = null): Result
{
return $this->wrappedStatement->execute($params);
}
}
'sql' => $this->sql,
'params' => $params ?? $this->params,
'types' => $this->types,
]);
return parent::execute($params);
}
}
/**
* {@inheritdoc}
*/
public function execute($params = null): Result
{
return $this->wrappedStatement->execute($params);
}
}
$this->debugDataHolder->addQuery($this->connectionName, $query = clone $this->query);
$query->start();
try {
$result = parent::execute($params);
} finally {
$query->stop();
}
return $result;
$logger->startQuery($this->sql, $this->params, $this->types);
}
try {
return new Result(
$this->stmt->execute($params),
$this->conn
);
} catch (Driver\Exception $ex) {
throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types);
} finally {
{
if ($params === []) {
$params = null; // Workaround as long execute() exists and used internally.
}
return $this->execute($params);
}
/**
* Executes the statement with the currently bound parameters and return affected rows.
*
$query_order = 'ORDER BY ';
$orderby[] = 'p.id DESC';
}
$order_by = join(',', $orderby);
$count = $conn->prepare("SELECT count(*) as total" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id");
$countAll = $count->executeQuery();
$sql = "SELECT p.*,m.image,m.activite_id" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id $query_order $order_by";
$stmt = $conn->prepare($sql);
$resultSet = $stmt->executeQuery();
$total = $countAll->rowCount();
$data = $resultSet->fetchAssociative();
* @Route("/{cp}/{ville}", name="app_default_city",requirements={"cp"="\d+"})
*/
public function ville(?string $cp,$ville): Response
{
$result = $this->entityManager
->getRepository(PwaEnfance::class)->findByCp($cp,$ville);
return $this->render('default/search.html.twig', [
'result' => $result['query'],
'link' => $result['link'],
'total' => $result['total'],
'totalPage' => $result['totalPage'],
$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);
{
$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) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$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);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
* {@inheritdoc}
*/
public function execute($params = null): ResultInterface
{
try {
$this->stmt->execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
return new Result($this->stmt);
* {@inheritdoc}
*/
public function execute($params = null): ResultInterface
{
try {
$this->stmt->execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
return new Result($this->stmt);
/**
* {@inheritdoc}
*/
public function execute($params = null): Result
{
return $this->wrappedStatement->execute($params);
}
}
'sql' => $this->sql,
'params' => $params ?? $this->params,
'types' => $this->types,
]);
return parent::execute($params);
}
}
/**
* {@inheritdoc}
*/
public function execute($params = null): Result
{
return $this->wrappedStatement->execute($params);
}
}
$this->debugDataHolder->addQuery($this->connectionName, $query = clone $this->query);
$query->start();
try {
$result = parent::execute($params);
} finally {
$query->stop();
}
return $result;
$logger->startQuery($this->sql, $this->params, $this->types);
}
try {
return new Result(
$this->stmt->execute($params),
$this->conn
);
} catch (Driver\Exception $ex) {
throw $this->conn->convertExceptionDuringQuery($ex, $this->sql, $this->params, $this->types);
} finally {
{
if ($params === []) {
$params = null; // Workaround as long execute() exists and used internally.
}
return $this->execute($params);
}
/**
* Executes the statement with the currently bound parameters and return affected rows.
*
$query_order = 'ORDER BY ';
$orderby[] = 'p.id DESC';
}
$order_by = join(',', $orderby);
$count = $conn->prepare("SELECT count(*) as total" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id");
$countAll = $count->executeQuery();
$sql = "SELECT p.*,m.image,m.activite_id" . $formule . " FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = '' OR fin >= '" . date('Y-m-d') . "' OR fin IS NULL) $where GROUP BY p.id $query_order $order_by";
$stmt = $conn->prepare($sql);
$resultSet = $stmt->executeQuery();
$total = $countAll->rowCount();
$data = $resultSet->fetchAssociative();
* @Route("/{cp}/{ville}", name="app_default_city",requirements={"cp"="\d+"})
*/
public function ville(?string $cp,$ville): Response
{
$result = $this->entityManager
->getRepository(PwaEnfance::class)->findByCp($cp,$ville);
return $this->render('default/search.html.twig', [
'result' => $result['query'],
'link' => $result['link'],
'total' => $result['total'],
'totalPage' => $result['totalPage'],
$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);
{
$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) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$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);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
No log messages
[3/3]
SyntaxErrorException
|
---|
Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 = 1 OR result_postcode = "35235" GROUP BY p.id' at line 1 at vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:88 at Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(object(Exception), object(Query)) (vendor/doctrine/dbal/src/Connection.php:1814) at Doctrine\DBAL\Connection->handleDriverException(object(Exception), object(Query)) (vendor/doctrine/dbal/src/Connection.php:1749) at Doctrine\DBAL\Connection->convertExceptionDuringQuery(object(Exception), 'SELECT count(*) as total FROM pwa_enfance p LEFT JOIN media m ON (p.id = activite_id) WHERE (fin = \'\' OR fin >= \'2024-03-29\' OR fin IS NULL) 1 = 1 OR result_postcode = "35235" GROUP BY p.id', array(), array()) (vendor/doctrine/dbal/src/Statement.php:184) at Doctrine\DBAL\Statement->execute(null) (vendor/doctrine/dbal/src/Statement.php:205) at Doctrine\DBAL\Statement->executeQuery() (src/Repository/PwaEnfanceRepository.php:241) at App\Repository\PwaEnfanceRepository->findByCp('35235', 'thorign-fouillard') (src/Controller/DefaultController.php:132) at App\Controller\DefaultController->ville('35235', 'thorign-fouillard') (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/data/www/root/labretagnedesenfants.bzh/prod/35d22df8f1de8e840628ae98f22780ceb82068a1-1680099099/vendor/autoload_runtime.php') (public/index.php:5) |
[2/3]
Exception
|
---|
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 = 1 OR result_postcode = "35235" GROUP BY p.id' at line 1 at vendor/doctrine/dbal/src/Driver/PDO/Exception.php:30 at Doctrine\DBAL\Driver\PDO\Exception::new(object(PDOException)) (vendor/doctrine/dbal/src/Driver/PDO/Statement.php:103) at Doctrine\DBAL\Driver\PDO\Statement->execute(null) (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:40) at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null) (vendor/doctrine/dbal/src/Logging/Statement.php:74) at Doctrine\DBAL\Logging\Statement->execute(null) (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:40) at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null) (vendor/symfony/doctrine-bridge/Middleware/Debug/Statement.php:65) at Symfony\Bridge\Doctrine\Middleware\Debug\Statement->execute(null) (vendor/doctrine/dbal/src/Statement.php:180) at Doctrine\DBAL\Statement->execute(null) (vendor/doctrine/dbal/src/Statement.php:205) at Doctrine\DBAL\Statement->executeQuery() (src/Repository/PwaEnfanceRepository.php:241) at App\Repository\PwaEnfanceRepository->findByCp('35235', 'thorign-fouillard') (src/Controller/DefaultController.php:132) at App\Controller\DefaultController->ville('35235', 'thorign-fouillard') (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/data/www/root/labretagnedesenfants.bzh/prod/35d22df8f1de8e840628ae98f22780ceb82068a1-1680099099/vendor/autoload_runtime.php') (public/index.php:5) |
[1/3]
PDOException
|
---|
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 = 1 OR result_postcode = "35235" GROUP BY p.id' at line 1 at vendor/doctrine/dbal/src/Driver/PDO/Statement.php:101 at PDOStatement->execute(null) (vendor/doctrine/dbal/src/Driver/PDO/Statement.php:101) at Doctrine\DBAL\Driver\PDO\Statement->execute(null) (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:40) at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null) (vendor/doctrine/dbal/src/Logging/Statement.php:74) at Doctrine\DBAL\Logging\Statement->execute(null) (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:40) at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null) (vendor/symfony/doctrine-bridge/Middleware/Debug/Statement.php:65) at Symfony\Bridge\Doctrine\Middleware\Debug\Statement->execute(null) (vendor/doctrine/dbal/src/Statement.php:180) at Doctrine\DBAL\Statement->execute(null) (vendor/doctrine/dbal/src/Statement.php:205) at Doctrine\DBAL\Statement->executeQuery() (src/Repository/PwaEnfanceRepository.php:241) at App\Repository\PwaEnfanceRepository->findByCp('35235', 'thorign-fouillard') (src/Controller/DefaultController.php:132) at App\Controller\DefaultController->ville('35235', 'thorign-fouillard') (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/data/www/root/labretagnedesenfants.bzh/prod/35d22df8f1de8e840628ae98f22780ceb82068a1-1680099099/vendor/autoload_runtime.php') (public/index.php:5) |