Merge "Fix check for null edits"

This commit is contained in:
jenkins-bot 2021-01-26 16:58:51 +00:00 committed by Gerrit Code Review
commit 1b83e64440

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?