Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 913a317

Browse files
[DoctrineBridge] Fix cross-versions compat
1 parent b691c31 commit 913a317

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Symfony/Bridge/Doctrine/Middleware/Debug/Statement.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ public function __construct(
3939
$this->query = new Query($sql);
4040
}
4141

42-
public function bindValue(int|string $param, mixed $value, ParameterType $type): void
42+
public function bindValue($param, $value, $type = null): void
4343
{
44+
$type ??= ParameterType::STRING;
4445
$this->query->setValue($param, $value, $type);
4546

4647
parent::bindValue($param, $value, $type);
4748
}
4849

49-
public function execute(): ResultInterface
50+
public function execute($params = null): ResultInterface
5051
{
5152
// clone to prevent variables by reference to change
5253
$this->debugDataHolder->addQuery($this->connectionName, $query = clone $this->query);
@@ -55,7 +56,7 @@ public function execute(): ResultInterface
5556
$query->start();
5657

5758
try {
58-
return parent::execute();
59+
return parent::execute($params);
5960
} finally {
6061
$query->stop();
6162
$this->stopwatch?->stop('doctrine');

0 commit comments

Comments
 (0)