From: Piotr Miazga Date: Fri, 1 Mar 2019 18:13:28 +0000 (+0100) Subject: Hygiene: use null-coalescing operator when operating on tags X-Git-Tag: 1.34.0-rc.0~2689^2 X-Git-Url: http://git.cyclocoop.org/data/File:Image2.gif?a=commitdiff_plain;h=037c06e886c63;p=lhc%2Fweb%2Fwiklou.git Hygiene: use null-coalescing operator when operating on tags Change-Id: I7d5b4e05ee6c010b4f9438bc4871a3369b1871a6 --- 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 ); }