From 7f7ffbb1beb1176c443a0ef19558cbe99a7a4c7e Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 4 Jan 2017 11:49:17 -0800 Subject: [PATCH] ApiVisualEditorEditor#postData: Use isset on oldid post param Bug: T154559 Change-Id: I83907f7df9360bb6fcc03615ec9e5d1d5856250b --- ApiVisualEditorEdit.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php index 999d494db9..5a9e50328a 100644 --- a/ApiVisualEditorEdit.php +++ b/ApiVisualEditorEdit.php @@ -183,11 +183,8 @@ class ApiVisualEditorEdit extends ApiVisualEditor { } protected function postData( $path, $title, $data, $parserParams, $etag ) { - if ( $parserParams['oldid'] === 0 ) { - $parserParams['oldid'] = ''; - } $path .= urlencode( $title->getPrefixedDBkey() ); - if ( $parserParams['oldid'] ) { + if ( isset( $parserParams['oldid'] ) && $parserParams['oldid'] ) { $path .= '/' . $parserParams['oldid']; } return $this->requestRestbase(