Skip to content

Commit de2b195

Browse files
authored
Merge pull request #8999 from jdarwood007/fixes8973
Add missing $id_member_updated
2 parents d8f2dac + d8311de commit de2b195

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

Sources/Db/APIs/MySQL.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ public function insert(string $method, string $table, array $columns, array $dat
409409
$insertRows = [];
410410

411411
foreach ($data as $dataRow) {
412+
if (\count($indexed_columns) !== \count($dataRow)) {
413+
$this->error_backtrace(
414+
'Invalid insert query. Requested columns does not match the number keys on inserted data.',
415+
'',
416+
E_USER_ERROR,
417+
__FILE__,
418+
__LINE__,
419+
);
420+
}
412421
$insertRows[] = $this->quote($insertData, array_combine($indexed_columns, $dataRow), $connection);
413422
}
414423

Sources/Db/APIs/PostgreSQL.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,16 @@ public function insert(string $method, string $table, array $columns, array $dat
470470
$insertRows = [];
471471

472472
foreach ($data as $dataRow) {
473+
if (\count($indexed_columns) !== \count($dataRow)) {
474+
$this->error_backtrace(
475+
'Invalid insert query. Requested columns does not match the number keys on inserted data.',
476+
'',
477+
E_USER_ERROR,
478+
__FILE__,
479+
__LINE__,
480+
);
481+
}
482+
473483
$insertRows[] = $this->quote($insertData, array_combine($indexed_columns, $dataRow), $connection);
474484
}
475485

Sources/Topic.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ class Topic implements \ArrayAccess, Routable
8787
*/
8888
public int $id_member_started;
8989

90+
/**
91+
* @var int
92+
*
93+
* ID number of the user who reply this topic.
94+
* This will be 0 for topics replied by guests.
95+
*/
96+
public int $id_member_updated;
97+
9098
/**
9199
* @var string
92100
*

0 commit comments

Comments
 (0)