Hygiene: use null-coalescing operator when operating on tags
authorPiotr Miazga <piotr@polishdeveloper.pl>
Fri, 1 Mar 2019 18:13:28 +0000 (19:13 +0100)
committerPiotr Miazga <piotr@polishdeveloper.pl>
Fri, 1 Mar 2019 18:13:28 +0000 (19:13 +0100)
Change-Id: I7d5b4e05ee6c010b4f9438bc4871a3369b1871a6

includes/logging/LogEntry.php

index 5706f2d..937fa37 100644 (file)
@@ -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 );
                                        }