Skip to content

Commit d465645

Browse files
bug symfony#61650 [DoctrineBridge] Fix (nicolas-grekas)
This PR was merged into the 7.4 branch. Discussion ---------- [DoctrineBridge] Fix | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Introduced in symfony#61582 Commits ------- d9ca867 [DoctrineBridge] Fix
2 parents d8ac787 + d9ca867 commit d465645

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Symfony/Bridge/Doctrine/SchemaListener/AbstractSchemaListener.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,9 @@ protected function getIsSameDatabaseChecker(Connection $connection): \Closure
5959
}
6060

6161
try {
62-
$rowCount = $connection->executeStatement('DELETE FROM _schema_subscriber_check WHERE key == :key', ['key' => $key], ['key' => Types::STRING]);
63-
64-
return 0 === $rowCount;
62+
return !$connection->executeStatement('DELETE FROM _schema_subscriber_check WHERE key == :key', ['key' => $key], ['key' => Types::STRING]);
6563
} finally {
66-
[$count] = $connection->executeQuery('SELECT count(id) FROM _schema_subscriber_check')->fetchOne();
67-
68-
if (!$count) {
64+
if (!$connection->executeQuery('SELECT count(id) FROM _schema_subscriber_check')->fetchOne()) {
6965
try {
7066
$schemaManager->dropTable('_schema_subscriber_check');
7167
} catch (DatabaseObjectNotFoundException) {

0 commit comments

Comments
 (0)