diff --git a/Sources/Db/APIs/MySQL.php b/Sources/Db/APIs/MySQL.php index 27106cd73f..9356391cb8 100644 --- a/Sources/Db/APIs/MySQL.php +++ b/Sources/Db/APIs/MySQL.php @@ -407,7 +407,7 @@ public function insert(string $method, string $table, array $columns, array $dat foreach ($data as $dataRow) { if (\count($indexed_columns) !== \count($dataRow)) { $this->error_backtrace( - 'Invalid insert query. Requested columns does not match the number keys on inserted data.', + 'Invalid insert query. Requested column count does not match the number of keys on inserted data.', '', E_USER_ERROR, __FILE__, diff --git a/Sources/Db/APIs/PostgreSQL.php b/Sources/Db/APIs/PostgreSQL.php index b15525ee35..9dc4b497d2 100644 --- a/Sources/Db/APIs/PostgreSQL.php +++ b/Sources/Db/APIs/PostgreSQL.php @@ -456,7 +456,7 @@ public function insert(string $method, string $table, array $columns, array $dat foreach ($data as $dataRow) { if (\count($indexed_columns) !== \count($dataRow)) { $this->error_backtrace( - 'Invalid insert query. Requested columns does not match the number keys on inserted data.', + 'Invalid insert query. Requested column count does not match the number of keys on inserted data.', '', E_USER_ERROR, __FILE__, diff --git a/Sources/Db/DatabaseApi.php b/Sources/Db/DatabaseApi.php index 7b48c4e07c..2e2bd1fee2 100644 --- a/Sources/Db/DatabaseApi.php +++ b/Sources/Db/DatabaseApi.php @@ -394,7 +394,7 @@ public function getTypeIndicators(string $table_name, array $column_values): arr // defined the way they are supposed to be, but that's fine since // if the theoretical column type doesn't match the actual column // type, we are doomed to run into errors anyway. - $table = Schema\Table::find($table_name, preg_replace('/^(\d+)\.(\d+)/', 'v$1_$2', SMF_VERSION)); + $table = Schema\Table::find($table_name, preg_replace('/^(\d+)\.(\d+).*/', 'v$1_$2', SMF_VERSION)); if ($table instanceof Schema\Table) { foreach ($table->columns as $col) {