jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/405299 )
Change subject: Fix "Error code 0" issue
......................................................................
Fix "Error code 0" issue
In some cases the returned code is integer "0". Adding the message to the
errors-array then collieds with this index.
Change-Id: I42ba94963208c749c8e82c68c121bbc3271b44ac
---
M includes/api/BSApiTasksBase.php
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Mglaser: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/BSApiTasksBase.php b/includes/api/BSApiTasksBase.php
index 4cfd37a..93e8be5 100644
--- a/includes/api/BSApiTasksBase.php
+++ b/includes/api/BSApiTasksBase.php
@@ -158,6 +158,9 @@
if( $e instanceof DBError ) {
$mCode = 'dberror';
//TODO: error code for subtypes like DBQueryError or DBReadOnlyError?
}
+ if ( $mCode === 0 ) {
+ $mCode = 'error-0';
+ }
$oResult->errors[$mCode] =
$e->getMessage();
$oResult->errors[0]['code'] =
'unknown error';
}
--
To view, visit https://gerrit.wikimedia.org/r/405299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I42ba94963208c749c8e82c68c121bbc3271b44ac
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