diff --git a/resources/sql/autopatches/20161213.diff.01.hunks.php b/resources/sql/autopatches/20161213.diff.01.hunks.php index c6394defce..574adb3b4f 100644 --- a/resources/sql/autopatches/20161213.diff.01.hunks.php +++ b/resources/sql/autopatches/20161213.diff.01.hunks.php @@ -1,38 +1,39 @@ establishConnection('w'); $src_table = 'differential_hunk'; $dst_table = 'differential_hunk_modern'; echo tsprintf( "%s\n", pht('Migrating old hunks...')); foreach (new LiskRawMigrationIterator($conn, $src_table) as $row) { queryfx( $conn, 'INSERT INTO %T (changesetID, oldOffset, oldLen, newOffset, newLen, dataType, dataEncoding, dataFormat, data, dateCreated, dateModified) VALUES (%d, %d, %d, %d, %d, %s, %s, %s, %s, %d, %d)', $dst_table, $row['changesetID'], $row['oldOffset'], $row['oldLen'], $row['newOffset'], $row['newLen'], DifferentialModernHunk::DATATYPE_TEXT, 'utf8', DifferentialModernHunk::DATAFORMAT_RAW, - $row['changes'], + // In rare cases, this could be NULL. See T12090. + (string)$row['changes'], $row['dateCreated'], $row['dateModified']); } echo tsprintf( "%s\n", pht('Done.'));