jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/375817 )
Change subject: BSApiTasksBase: Fix for REL1_30 issue with mw.Api
......................................................................
BSApiTasksBase: Fix for REL1_30 issue with mw.Api
See inline docs
Change-Id: I5ae1ec3f1baf8d58a9ee0cad51be3d8c2a9dbd31
---
M includes/api/BSApiTasksBase.php
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Pwirth: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/BSApiTasksBase.php b/includes/api/BSApiTasksBase.php
index 580b69d..c331748 100644
--- a/includes/api/BSApiTasksBase.php
+++ b/includes/api/BSApiTasksBase.php
@@ -171,6 +171,12 @@
if( $mFieldValue === null ) {
continue; //MW Api doesn't like NULL values
}
+
+ //Remove empty 'errors' array from respons as mw.Api in
MW 1.30+
+ //will interpret this field as indicator for a failed
request
+ if( $sFieldName === 'errors' && empty( $mFieldValue ) )
{
+ continue;
+ }
$this->getResult()->addValue(null, $sFieldName,
$mFieldValue);
}
}
--
To view, visit https://gerrit.wikimedia.org/r/375817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5ae1ec3f1baf8d58a9ee0cad51be3d8c2a9dbd31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits