Robert Vogel has uploaded a new change for review. ( 
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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/17/375817/1

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: newchange
Gerrit-Change-Id: I5ae1ec3f1baf8d58a9ee0cad51be3d8c2a9dbd31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to