Skip to content

Commit

Permalink
Fix infinite loop issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 27, 2024
1 parent 75ebbd4 commit c4222ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Db/Adapter/MysqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class MysqlAdapter extends PdoAdapter
*/
public function connect(): void
{

$this->getConnection()->getDriver()->connect();
$this->setConnection($this->getConnection());
}
Expand Down Expand Up @@ -1526,6 +1527,10 @@ public function getColumnTypes(): array
*/
protected function hasNativeUuid(): bool
{
// Prevent infinite connect() loop when MysqlAdapter is used as a stub.
if ($this->connection === null || !$this->getOption('connection')) {
return false;
}
$connection = $this->getConnection();
$version = $connection->getDriver()->version();

Expand Down

0 comments on commit c4222ab

Please sign in to comment.