diff -u b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php --- b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php @@ -142,9 +142,9 @@ * Before passing a field out of a schema definition into this function it has * to be processed by _db_process_field(). * - * @param $name + * @param string $name * Name of the field. - * @param $spec + * @param array $spec * The field specification, as per the schema data structure format. */ protected function createFieldSql($name, $spec) { @@ -317,7 +317,7 @@ $mysql_field = $this->processField($spec['fields'][$field_name]); if (in_array($mysql_field['mysql_type'], $this->mysqlStringTypes)) { // Check whether we need to shorten the index. - if (!(isset($mysql_field['type']) && $mysql_field['type'] == 'varchar_ascii') && !(isset($mysql_field['length']) && $mysql_field['length'] <= 191)) { + if ((!isset($mysql_field['type']) || $mysql_field['type'] != 'varchar_ascii') && (!isset($mysql_field['length']) || $mysql_field['length'] > 191)) { // Limit the index length to 191 characters. $this->shortenIndex($indexes[$index_name][$index_key]); } @@ -333,7 +333,7 @@ * * Shortens an index to 191 characters. * - * @param $index + * @param array $index * The index array to be used in createKeySql. * * @see Drupal\Core\Database\Driver\mysql\Schema::createKeySql()