jenkins-bot has submitted this change and it was merged.
Change subject: Make sure campaign data isn't set to false
......................................................................
Make sure campaign data isn't set to false
If for some reason the stored data can't be properly unserialized
(e.g. there's a syntax error), unserialize() will return false. We
should catch this condition rather than passing false as the value
to the client.
Change-Id: I635243f00917d6c6c683d2aab29e71296608e996
---
M includes/QuestionStore.php
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/QuestionStore.php b/includes/QuestionStore.php
index 5772ccb..7ec7322 100644
--- a/includes/QuestionStore.php
+++ b/includes/QuestionStore.php
@@ -68,7 +68,10 @@
$campaigns = array();
foreach ( $res as $row ) {
- $campaigns[$row->wgq_campaign] = unserialize(
$row->wgq_data );
+ $campaignData = unserialize( $row->wgq_data );
+ if ( $campaignData ) {
+ $campaigns[$row->wgq_campaign] = $campaignData;
+ }
}
return $campaigns;
}
--
To view, visit https://gerrit.wikimedia.org/r/179985
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I635243f00917d6c6c683d2aab29e71296608e996
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits