r95922 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95921‎ | r95922 | r95923 >
Date:23:24, 31 August 2011
Author:awjrichards
Status:ok
Tags:
Comment:
Fixed bug in general error handling in RapidHtml system that was trying to run a foreach() on a string rather than an array.
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php
@@ -86,7 +86,7 @@
8787 $this->set_html_file_path( htmlspecialchars( $wgRequest->getText( 'ffname', 'default' )));
8888
8989 // fix general form error messages so it's not an array of msgs
90 - if ( count( $form_errors[ 'general' ] )) {
 90+ if ( is_array( $form_errors[ 'general' ] ) && count( $form_errors[ 'general' ] )) {
9191 $general_errors = "";
9292 foreach ( $form_errors[ 'general' ] as $general_error ) {
9393 $general_errors .= "<p class='creditcard'>$general_error</p>";

Status & tagging log