Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -1187,10 +1187,13 @@ |
1188 | 1188 | curl_setopt( $ch, CURLOPT_POST, count( $data ) ); |
1189 | 1189 | curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $data ) ); |
1190 | 1190 | $curl_result = curl_exec( $ch ); |
| 1191 | + $curl_error = ( !$curl_result ) ? curl_error( $ch ) : null; |
1191 | 1192 | curl_close( $ch ); |
| 1193 | + |
1192 | 1194 | // throw an exception if there was a curl error |
1193 | | - if ( !$curl_result ) { |
1194 | | - throw new MWException( 'There was a cURL error submitting information to ' . $wgPayflowGatewayPaypalURL . ': ' . curl_error( $ch ) ); |
| 1195 | + if ( !is_null( $curl_error ) ) { |
| 1196 | + throw new MWException( 'There was a cURL error submitting information to ' . $wgPayflowGatewayPaypalURL . ': ' . $curl_error ); |
1195 | 1197 | } |
| 1198 | + |
1196 | 1199 | } |
1197 | 1200 | } // end class |
\ No newline at end of file |