From 037c06e886c636af9b6a5ba428d9c003fd572235 Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Fri, 1 Mar 2019 19:13:28 +0100 Subject: [PATCH] Hygiene: use null-coalescing operator when operating on tags Change-Id: I7d5b4e05ee6c010b4f9438bc4871a3369b1871a6 --- includes/logging/LogEntry.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 5706f2d080..937fa3702b 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -776,11 +776,7 @@ class ManualLogEntry extends LogEntryBase { if ( $to === 'rc' || $to === 'rcandudp' ) { // save RC, passing tags so they are applied there - $tags = $this->getTags(); - if ( is_null( $tags ) ) { - $tags = []; - } - $rc->addTags( $tags ); + $rc->addTags( $this->getTags() ?? [] ); $rc->save( $rc::SEND_NONE ); } -- 2.20.1