Merge "Avoid expensive array_shift where possible"

This commit is contained in:
jenkins-bot 2018-12-28 22:51:39 +00:00 committed by Gerrit Code Review
commit 7a8ea37e6f

View file

@ -66,7 +66,7 @@ class TestDiscussionParser extends Maintenance {
$newData = unserialize( $newData );
$pageData = array_shift( $newData['query']['pages'] );
$pageData = reset( $newData['query']['pages'] );
$oldText = isset( $pageData['revisions'][1] )
? trim( $pageData['revisions'][1]['*'] ) . "\n"
: '';