Clone the Title object to prevent mutations.
authorDavid Barratt <dbarratt@wikimedia.org>
Wed, 23 Jan 2019 22:53:56 +0000 (17:53 -0500)
committerDavid Barratt <dbarratt@wikimedia.org>
Wed, 23 Jan 2019 22:53:56 +0000 (17:53 -0500)
commitdedfe98eaad7015d52001988eeea9c00749e1a30
tree69c4c68e287a9ba6af175eb6484c16293819ec5b
parenta23e9cee4e33a678e98a2119f469cb1f538246d4
Clone the Title object to prevent mutations.

The Title object that is loaded from master gets reloaded from the replicas
and mutates the original object. When pages are moved, the Title no longer
exists on master, but still exists on the replicas. Cloning the object allows
the item to be loaded from the replicas, without mutating the original Title.

Bug: T210739
Change-Id: I9ad973e9a609124749909605f37bc1e1fc549585
includes/Title.php