Kaldari has uploaded a new change for review.
https://gerrit.wikimedia.org/r/179985
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok
refs/changes/85/179985/1
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: newchange
Gerrit-Change-Id: I635243f00917d6c6c683d2aab29e71296608e996
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits