Revision::getContent must return clone if mutable
authordaniel <daniel.kinzler@wikimedia.de>
Tue, 21 Aug 2012 10:48:29 +0000 (12:48 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Tue, 21 Aug 2012 10:48:29 +0000 (12:48 +0200)
commit266b66c899094f5fd12a8456da6a26363832dfb3
treead4879395c8431cb1a50a5c86b5580f3a1e4b0cd
parent0139923580d49247e1f92ac0346522c3ef16806b
Revision::getContent must return clone if mutable

Revision::getContent must return a cloned instance of the Content object
if the Content object is mutable to avoid confusion.

Content::copy is used to achieve this, which is specified to return $this
for immutable Content.

Change-Id: Iace17b6ae8aa85a3500624441b69bc067c1ade00
includes/AutoLoader.php
includes/Revision.php
tests/phpunit/includes/RevisionTest.php