X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdiff%2FDifferenceEngineSlotDiffRenderer.php;h=c389a6fd2abfd6c0c8683c07fa4059404116f3e4;hb=ef752a33bbc796ec7c3d555e43c02f611af8c29a;hp=0c632b97ecf7883262b643b4ee2305fd1a3abeb4;hpb=fede766fe9950e3a036c263bf17d19d31278221c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/DifferenceEngineSlotDiffRenderer.php b/includes/diff/DifferenceEngineSlotDiffRenderer.php index 0c632b97ec..c389a6fd2a 100644 --- a/includes/diff/DifferenceEngineSlotDiffRenderer.php +++ b/includes/diff/DifferenceEngineSlotDiffRenderer.php @@ -46,15 +46,7 @@ class DifferenceEngineSlotDiffRenderer extends SlotDiffRenderer { /** @inheritDoc */ public function getDiff( Content $oldContent = null, Content $newContent = null ) { - if ( !$oldContent && !$newContent ) { - throw new InvalidArgumentException( '$oldContent and $newContent cannot both be null' ); - } - if ( !$oldContent || !$newContent ) { - $someContent = $newContent ?: $oldContent; - $emptyContent = $someContent->getContentHandler()->makeEmptyContent(); - $oldContent = $oldContent ?: $emptyContent; - $newContent = $newContent ?: $emptyContent; - } + $this->normalizeContents( $oldContent, $newContent ); return $this->differenceEngine->generateContentDiffBody( $oldContent, $newContent ); }