X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdiff%2FDifferenceEngineSlotDiffRenderer.php;h=c389a6fd2abfd6c0c8683c07fa4059404116f3e4;hb=a9fb2b3b064c7d573cbed11f6cf3d78996a7f57e;hp=0c632b97ecf7883262b643b4ee2305fd1a3abeb4;hpb=b79bc0a2740b991525aae355ed216e0b9dc3aa86;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 ); }