r76170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76169‎ | r76170 | r76171 >
Date:23:55, 5 November 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Fixing potential undefined index notice in query string checker
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -709,7 +709,11 @@
710710
711711 $url = $wgRequest->getFullRequestURL();
712712 $url_parts = wfParseUrl( $url );
713 - $query_array = wfCgiToArray( $url_parts[ 'query' ] );
 713+ if ( isset( $url_parts[ 'query' ] ) ) {
 714+ $query_array = wfCgiToArray( $url_parts[ 'query' ] );
 715+ } else {
 716+ $query_array = array();
 717+ }
714718
715719 // ensure that _cache_ does not get set in the URL
716720 unset( $query_array[ '_cache_' ] );

Status & tagging log