mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Avoid undefined index warning for oldid if it's not set in serializeforcache"
This commit is contained in:
commit
e1252b7e47
|
@ -586,6 +586,9 @@ class ApiVisualEditor extends ApiBase {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'serializeforcache':
|
case 'serializeforcache':
|
||||||
|
if ( !isset( $parserParams['oldid'] ) ) {
|
||||||
|
$parserParams['oldid'] = Revision::newFromTitle( $title )->getId();
|
||||||
|
}
|
||||||
$key = $this->storeInSerializationCache( $title, $parserParams['oldid'], $html );
|
$key = $this->storeInSerializationCache( $title, $parserParams['oldid'], $html );
|
||||||
$result = array( 'result' => 'success', 'cachekey' => $key );
|
$result = array( 'result' => 'success', 'cachekey' => $key );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue