From 17a5d5a84bbdcde964d2c24c36f9934ab52e470b Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 19 Jun 2020 17:28:22 +0200 Subject: [PATCH] Fix combination of (int) and ?? (int) has higher precedence as ?? and that means the array key is always casted first and the error suppression part of ?? cannot work https://www.php.net/manual/en/language.operators.precedence.php Change-Id: Iee7dc9297c0745ce48295f637a7591ce9385aa4d --- includes/changes/ChangesList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index cd68eb422a6..d91aca6709f 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -752,7 +752,7 @@ class ChangesList extends ContextSource { $user = new UserIdentityValue( (int)$rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'], - (int)$rc->mAttribs['rc_actor'] ?? 0 + (int)( $rc->mAttribs['rc_actor'] ?? 0 ) ); $revRecord->setUser( $user );