r65068 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65067‎ | r65068 | r65069 >
Date:14:43, 15 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r65066 - non-raw parameters are now ignored more neatly
Modified paths:
  • /trunk/extensions/Validator/Validator.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/Validator.class.php
@@ -120,11 +120,11 @@
121121 */
122122 public function parseAndSetParams( array $rawParams, array $defaultParams = array() ) {
123123 $parameters = array();
124 - //var_dump($rawParams); exit;
 124+
125125 foreach( $rawParams as $arg ) {
126 - if ( is_array( $arg ) ) {
127 -
128 - } else {
 126+ // Only take into account strings. If the value is not a string,
 127+ // it is not a raw parameter, and can not be parsed correctly in all cases.
 128+ if ( is_string( $arg ) ) {
129129 $parts = explode( '=', $arg );
130130 if ( count( $parts ) == 1 ) {
131131 if ( count( $defaultParams ) > 0 ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65066Changes for 0.3 - changed function namejeroendedauw14:33, 15 April 2010

Status & tagging log