Merge "resourceloader: Compile documentElement.className server-side"
[lhc/web/wiklou.git] / includes / logging / ManualLogEntry.php
index 90c0a72..5326705 100644 (file)
@@ -191,18 +191,20 @@ class ManualLogEntry extends LogEntryBase implements Taggable {
                        wfDebug( 'Overwriting existing ManualLogEntry tags' );
                }
                $this->tags = [];
-               if ( $tags !== null ) {
-                       $this->addTags( $tags );
-               }
+               $this->addTags( $tags );
        }
 
        /**
         * Add change tags for the log entry
         *
         * @since 1.33
-        * @param string|string[] $tags Tags to apply
+        * @param string|string[]|null $tags Tags to apply
         */
        public function addTags( $tags ) {
+               if ( $tags === null ) {
+                       return;
+               }
+
                if ( is_string( $tags ) ) {
                        $tags = [ $tags ];
                }
@@ -335,7 +337,7 @@ class ManualLogEntry extends LogEntryBase implements Taggable {
                        }
                }
                if ( count( $rows ) ) {
-                       $dbw->insert( 'log_search', $rows, __METHOD__, 'IGNORE' );
+                       $dbw->insert( 'log_search', $rows, __METHOD__, [ 'IGNORE' ] );
                }
 
                return $this->id;