Skip to content

Commit

Permalink
Merge pull request #3412 from morozov/issues/3410
Browse files Browse the repository at this point in the history
`CREATE_OPTIONS` is nullable in MySQL
  • Loading branch information
morozov committed Dec 27, 2018
2 parents 51635fe + 28b0190 commit c23b864
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
Expand Up @@ -312,11 +312,11 @@ public function listTableDetails($tableName)
/**
* @return string[]|true[]
*/
private function parseCreateOptions(string $string) : array
private function parseCreateOptions(?string $string) : array
{
$options = [];

if ($string === '') {
if ($string === null || $string === '') {
return $options;
}

Expand Down
Expand Up @@ -531,4 +531,11 @@ public function testEnsureTableWithoutOptionsAreReflectedInMetadata() : void
self::assertEquals('', $onlineTable->getOption('comment'));
self::assertEquals([], $onlineTable->getOption('create_options'));
}

public function testParseNullCreateOptions() : void
{
$table = $this->schemaManager->listTableDetails('sys.processlist');

self::assertEquals([], $table->getOption('create_options'));
}
}

0 comments on commit c23b864

Please sign in to comment.