diff --git a/libraries/classes/Table.php b/libraries/classes/Table.php
index c0f80d886f..70edd4f28e 100644
--- a/libraries/classes/Table.php
+++ b/libraries/classes/Table.php
@@ -1531,8 +1531,9 @@ class Table implements Stringable
RENAME TABLE ' . $this->getFullName(true) . '
TO ' . $newTable->getFullName(true) . ';';
// I don't think a specific error message for views is necessary
- if (! $this->dbi->query($GLOBALS['sql_query'])) {
- // TODO: this is dead code, should it be removed?
+ if ($this->dbi->tryQuery($GLOBALS['sql_query']) === false) {
+ $this->errors[] = $this->dbi->getError();
+
// Restore triggers in the old database
if ($handleTriggers) {
$this->dbi->selectDb($this->getDbName());
@@ -1541,12 +1542,6 @@ class Table implements Stringable
}
}
- $this->errors[] = sprintf(
- __('Failed to rename table %1$s to %2$s!'),
- $this->getFullName(),
- $newTable->getFullName()
- );
-
return false;
}
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index d50ecf14ab..670d00be5b 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -8365,11 +8365,6 @@ parameters:
count: 1
path: libraries/classes/Table.php
- -
- message: "#^Negated boolean expression is always false\\.$#"
- count: 1
- path: libraries/classes/Table.php
-
-
message: "#^Parameter \\#1 \\$string of function substr expects string, mixed given\\.$#"
count: 2
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 9406be646c..b86f927807 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -13727,8 +13727,7 @@
return $sqlQuery;
-
- ! $this->dbi->query($GLOBALS['sql_query'])
+
$rowFields[$key] != 'cc'
@@ -13815,7 +13814,7 @@
-
+
$_POST['criteriaColumnNames'][$column_index]
$_POST['criteriaColumnTypes'][$column_index]
$column
@@ -13830,16 +13829,14 @@
$criteriaValues[0]
$operator
$operator
- $tmp_geom_func
$value
$values
-
+
$column
$operator
- $tmp_geom_func
$value
@@ -13849,28 +13846,17 @@
$values[0] ?? ''
$values[1] ?? ''
-
- $_POST['criteriaColumnNames'][$column_index]
- $_POST['criteriaColumnTypes'][$column_index]
+
$_POST['customWhereClause']
$_POST['orderByColumn']
$_POST['table']
- $operator
- $operator
$tmp_geom_func
-
+
$_POST['criteriaColumnNames'][$column_index]
$_POST['criteriaColumnTypes'][$column_index]
$_POST['criteriaValues'][$column_index]
- $_POST['geom_func'][$column_index]
-
- $_POST['criteriaColumnNames'][$column_index]
- $_POST['criteriaColumnTypes'][$column_index]
- $operator
- $operator
-
$_POST['criteriaColumnOperators']
$columnsToDisplay