Remove escapeString from CreateAddField

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2024-01-09 03:09:11 +01:00
parent 6170248811
commit 5889920e91
3 changed files with 8 additions and 14 deletions

View File

@ -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

View File

@ -4381,10 +4381,6 @@
</UnsupportedReferenceUsage>
</file>
<file src="src/CreateAddField.php">
<DeprecatedMethod>
<code>escapeString</code>
<code>escapeString</code>
</DeprecatedMethod>
<MixedArgument>
<code><![CDATA[$_POST['field_name'][$column['col_index']]]]></code>
<code><![CDATA[$_POST['field_name'][$i]]]></code>
@ -4394,9 +4390,7 @@
<code>$index</code>
<code>$index</code>
<code><![CDATA[$index['Index_comment']]]></code>
<code><![CDATA[$index['Key_block_size']]]></code>
<code><![CDATA[$index['Key_name']]]></code>
<code><![CDATA[$index['Parser']]]></code>
<code>$partition</code>
<code>$subpartition</code>
</MixedArgument>
@ -4430,6 +4424,7 @@
</MixedAssignment>
<MixedOperand>
<code><![CDATA[$column['size']]]></code>
<code><![CDATA[$index['Parser']]]></code>
<code><![CDATA[$partition['comment']]]></code>
<code><![CDATA[$partition['data_directory']]]></code>
<code><![CDATA[$partition['engine']]]></code>

View File

@ -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']) {