Skip to content

Commit bc61ebe

Browse files
authored
Merge pull request #4364 from morozov/issues/4359
Move the logic out of the assertion
2 parents 1f72f05 + eb34f48 commit bc61ebe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,8 @@ protected function _getPortableTableForeignKeyDefinition($tableForeignKey)
154154
$onDelete = $match[1];
155155
}
156156

157-
assert(preg_match(
158-
'/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)/',
159-
$tableForeignKey['condef'],
160-
$values
161-
) !== 0);
157+
$result = preg_match('/FOREIGN KEY \((.+)\) REFERENCES (.+)\((.+)\)/', $tableForeignKey['condef'], $values);
158+
assert($result === 1);
162159

163160
// PostgreSQL returns identifiers that are keywords with quotes, we need them later, don't get
164161
// the idea to trim them here.

0 commit comments

Comments
 (0)