diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4ed75bb9a3..0069e694a4 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6440,6 +6440,11 @@ parameters: count: 1 path: src/CreateAddField.php + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: src/CreateAddField.php + - message: "#^Cannot cast mixed to string\\.$#" count: 2 @@ -6490,11 +6495,6 @@ parameters: count: 2 path: src/CreateAddField.php - - - message: "#^Parameter \\#1 \\$str of method PhpMyAdmin\\\\DatabaseInterface\\:\\:escapeString\\(\\) expects string, mixed given\\.$#" - count: 2 - path: src/CreateAddField.php - - message: "#^Parameter \\#1 \\$str of method PhpMyAdmin\\\\DatabaseInterface\\:\\:quoteString\\(\\) expects string, mixed given\\.$#" count: 3 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 502faef44e..4cb89dd4af 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -4381,10 +4381,6 @@ - - escapeString - escapeString - @@ -4394,9 +4390,7 @@ $index $index - - $partition $subpartition @@ -4430,6 +4424,7 @@ + diff --git a/src/CreateAddField.php b/src/CreateAddField.php index c3bef39fa5..d2d7c0a312 100644 --- a/src/CreateAddField.php +++ b/src/CreateAddField.php @@ -165,8 +165,7 @@ class CreateAddField $sqlQuery .= ' (' . implode(', ', $indexFields) . ')'; if ($index['Key_block_size']) { - $sqlQuery .= ' KEY_BLOCK_SIZE = ' - . $this->dbi->escapeString($index['Key_block_size']); + $sqlQuery .= ' KEY_BLOCK_SIZE = ' . (int) $index['Key_block_size']; } // specifying index type is allowed only for primary, unique and index only @@ -179,7 +178,7 @@ class CreateAddField } if ($index['Index_choice'] === 'FULLTEXT' && $index['Parser']) { - $sqlQuery .= ' WITH PARSER ' . $this->dbi->escapeString($index['Parser']); + $sqlQuery .= ' WITH PARSER ' . $index['Parser']; } if ($index['Index_comment']) {