CommentStore->insert() takes the raw comment, not quoted, and returns
fields appropriate for passing as $a to IDatabase->insert() or $values
to ->update(). Such fields need to be passed through
IDatabase->addQuotes() to be appropriate for passing in $varMap to
IDatabase->insertSelect().
Change-Id: Ie64b279ee7cf9c8c396af385e46c826e0597ab1e
$encTimestamp = $dbw->addQuotes( $dbw->timestamp( $now ) );
$encUserId = $dbw->addQuotes( $this->user->getId() );
- $encReason = $dbw->addQuotes( $this->reason );
$encGroup = $dbw->addQuotes( 'deleted' );
$ext = $this->file->getExtension();
$dotExt = $ext === '' ? '' : ".$ext";
];
$joins = [];
- $fields += $commentStoreFaReason->insert( $dbw, $encReason );
+ $fields += array_map(
+ [ $dbw, 'addQuotes' ],
+ $commentStoreFaReason->insert( $dbw, $this->reason )
+ );
if ( $wgCommentTableSchemaMigrationStage <= MIGRATION_WRITE_BOTH ) {
$fields['fa_description'] = 'img_description';