diff --git a/libraries/classes/Plugins/Export/ExportSql.php b/libraries/classes/Plugins/Export/ExportSql.php index c91639e0f7..71220d059c 100644 --- a/libraries/classes/Plugins/Export/ExportSql.php +++ b/libraries/classes/Plugins/Export/ExportSql.php @@ -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]); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9051dde58c..4680a7b519 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5245,11 +5245,6 @@ parameters: count: 1 path: libraries/classes/Plugins/Export/ExportPhparray.php - - - message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\\\|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\\|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\\.$#" - count: 1 - path: libraries/classes/Plugins/Export/ExportSql.php - - message: "#^Cannot access offset 'action_timing' on mixed\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 9754ea64db..faf003bbe1 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -8817,16 +8817,9 @@ - - name)]]> - - - Context::escape($alias) - $createQuery $definition - name]]> $tableAlias $tableAlias $tableAlias