Merge "Avoid undefined index warning for oldid if it's not set in serializeforcache"

This commit is contained in:
jenkins-bot 2015-04-04 23:14:40 +00:00 committed by Gerrit Code Review
commit e1252b7e47

View file

@ -586,6 +586,9 @@ class ApiVisualEditor extends ApiBase {
break;
case 'serializeforcache':
if ( !isset( $parserParams['oldid'] ) ) {
$parserParams['oldid'] = Revision::newFromTitle( $title )->getId();
}
$key = $this->storeInSerializationCache( $title, $parserParams['oldid'], $html );
$result = array( 'result' => 'success', 'cachekey' => $key );
break;