r104771 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104770‎ | r104771 | r104772 >
Date:23:02, 30 November 2011
Author:gregchiasson
Status:deferred
Tags:
Comment:
AFTv5 bug fix - r104769 was giving warnings if rating was undefined. Added a check around that to prevent accessing a non-existant value.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -22,8 +22,8 @@
2323 $this->api = $this->getApi();
2424 $output = '';
2525 $ratings = $this->api->fetchOverallRating( $pageId );
26 - $found = $ratings['found'];
27 - $rating = $ratings['rating'];
 26+ $found = isset( $ratings['found'] ) ? $ratings['found'] : null;
 27+ $rating = isset( $ratings['rating'] ) ? $ratings['rating'] : null;
2828
2929 $output .= "[[Wikipedia:$title|Go to Article]]
3030 | [[Wikipedia:$title|Discussion page]]

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104769AFTv5 - Attempted abuse/hiding API.gregchiasson22:53, 30 November 2011

Status & tagging log