Fix error reported by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
e963d6610d
commit
d1c2c6e07d
@ -1575,7 +1575,7 @@ class ExportSql extends ExportPlugin
|
||||
}
|
||||
|
||||
// Creating the parts that drop foreign keys.
|
||||
if ($field->key !== null && $field->key->type === 'FOREIGN KEY') {
|
||||
if ($field->key !== null && $field->key->type === 'FOREIGN KEY' && $field->name !== null) {
|
||||
$dropped[] = 'FOREIGN KEY ' . Context::escape($field->name);
|
||||
unset($statement->fields[$key]);
|
||||
}
|
||||
|
||||
@ -5245,11 +5245,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportPhparray.php
|
||||
|
||||
-
|
||||
message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\<string\\>\\|string results in an error\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'alias' on mixed\\.$#"
|
||||
count: 8
|
||||
@ -5360,11 +5355,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$str of static method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:escape\\(\\) expects array\\<string\\>\\|string, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -5400,11 +5390,6 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Token\\:\\:\\$token \\(string\\) does not accept array\\<string\\>\\|string\\.$#"
|
||||
count: 1
|
||||
path: libraries/classes/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'action_timing' on mixed\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -8817,16 +8817,9 @@
|
||||
<code><![CDATA[$GLOBALS['plugin_param']['export_type']]]></code>
|
||||
<code><![CDATA[$GLOBALS['plugin_param']['single_table']]]></code>
|
||||
</PossiblyInvalidArrayOffset>
|
||||
<PossiblyInvalidOperand>
|
||||
<code><![CDATA[Context::escape($field->name)]]></code>
|
||||
</PossiblyInvalidOperand>
|
||||
<PossiblyInvalidPropertyAssignmentValue>
|
||||
<code>Context::escape($alias)</code>
|
||||
</PossiblyInvalidPropertyAssignmentValue>
|
||||
<PossiblyNullArgument>
|
||||
<code>$createQuery</code>
|
||||
<code>$definition</code>
|
||||
<code><![CDATA[$field->name]]></code>
|
||||
<code>$tableAlias</code>
|
||||
<code>$tableAlias</code>
|
||||
<code>$tableAlias</code>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user