Merge "LogFormatter: ignore unrecoverable data"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 3 Apr 2019 19:06:14 +0000 (19:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 3 Apr 2019 19:06:14 +0000 (19:06 +0000)
includes/logging/LogFormatter.php

index 1f37a35..b9bb70c 100644 (file)
@@ -817,6 +817,11 @@ class LogFormatter {
                foreach ( $this->getParametersForApi() as $key => $value ) {
                        $vals = explode( ':', $key, 3 );
                        if ( count( $vals ) !== 3 ) {
+                               if ( $value instanceof __PHP_Incomplete_Class ) {
+                                       wfLogWarning( 'Log entry of type ' . $this->entry->getFullType() .
+                                               ' contains unrecoverable extra parameters.' );
+                                       continue;
+                               }
                                $logParams[$key] = $value;
                                continue;
                        }