Fix addMissingLoggingEntries maintenance script handling of newlines

Bug: T54919
Change-Id: I0a979d9022ce3371813e214a7e4e1432e34c823b
This commit is contained in:
Alex Monk 2015-08-22 23:28:18 +01:00
parent 1b9c71fabe
commit e3db4db83e

View file

@ -25,7 +25,7 @@ class AddMissingLoggingEntries extends Maintenance {
// Because the timestamp matches aren't exact (sometimes a couple of seconds off), we need to check all our results and ignore those that do actually have log entries
foreach ( $afhResult as $row ) {
$logParams[] = $row->afh_id . '\n' . $row->afh_filter;
$logParams[] = $row->afh_id . "\n" . $row->afh_filter;
$afhRows[$row->afh_id] = $row;
}
@ -41,7 +41,7 @@ class AddMissingLoggingEntries extends Maintenance {
);
foreach ( $logResult as $row ) {
$params = explode( "\\n", $row->log_params ); // id . '\n' . filter
$params = explode( "\n", $row->log_params ); // id . '\n' . filter
$afhId = $params[0]; // id
unset( $afhRows[$afhId] ); // Forget this row had any issues - it just has a different timestamp in the log
}