ChangesList::insertRollback - Force rc_this_oldid to integer before use

Same for the other fields that needed to be integers

Follow up to 71b64e46e4

Bug: T251386
Change-Id: Idf4cc7d3cc54a98e46619c0996f8109bc1e88620
This commit is contained in:
DannyS712 2020-04-29 10:55:12 +00:00
parent 9486241a5f
commit 3d4fb45f96

View file

@ -745,12 +745,12 @@ class ChangesList extends ContextSource {
->quickUserCan( 'rollback', $this->getUser(), $title )
) {
$revRecord = new MutableRevisionRecord( $title );
$revRecord->setId( $rc->mAttribs['rc_this_oldid'] );
$revRecord->setVisibility( $rc->mAttribs['rc_deleted'] );
$revRecord->setId( (int)$rc->mAttribs['rc_this_oldid'] );
$revRecord->setVisibility( (int)$rc->mAttribs['rc_deleted'] );
$user = new UserIdentityValue(
$rc->mAttribs['rc_user'],
(int)$rc->mAttribs['rc_user'],
$rc->mAttribs['rc_user_text'],
$rc->mAttribs['rc_actor'] ?? 0
(int)$rc->mAttribs['rc_actor'] ?? 0
);
$revRecord->setUser( $user );