Fix check for null edits

Yet again, the CAPTCHA being neither an error nor a success bites us.

Bug: T272922
Change-Id: I5ef85df452638ad3208e7a1cadad44c83237dbfe
This commit is contained in:
Bartosz Dziewoński 2021-01-26 00:02:15 +01:00
parent 460283baa5
commit ca9db69b40

View file

@ -197,7 +197,7 @@ class ApiDiscussionToolsEdit extends ApiBase {
break;
}
if ( !isset( $result['newrevid'] ) ) {
if ( !isset( $result['newrevid'] ) && isset( $result['result'] ) && $result['result'] === 'success' ) {
// No new revision, so no changes were made to the page (null edit).
// Comment was not actually saved, so for this API, that's an error.
// This is probably because changes were inside a transclusion's HTML?