Index: trunk/extensions/Validator/Validator.class.php |
— | — | @@ -223,14 +223,14 @@ |
224 | 224 | if ( !array_key_exists( $mainName, $this->mParameters ) || self::$acceptOverriding ) { |
225 | 225 | // If the valueis an array, this means it has been procesed in parseAndSetParams already. |
226 | 226 | // If it is not, setParameters was called directly with an array of string parameter values. |
227 | | - if ( is_array( $paramData ) ) { |
| 227 | + if ( is_array( $paramData ) && array_key_exists( 'original-value', $paramData ) ) { |
228 | 228 | $paramData['original-name'] = $paramName; |
229 | 229 | if ( $toLower ) $paramData['original-value'] = strtolower( $paramData['original-value'] ); |
230 | 230 | $this->mParameters[$mainName] = $paramData; |
231 | 231 | } |
232 | 232 | else { |
233 | 233 | $this->mParameters[$mainName] = array( |
234 | | - 'original-value' => $toLower ? strtolower( $paramData ) : $paramData, |
| 234 | + 'original-value' => $toLower && is_string( $paramData ) ? strtolower( $paramData ) : $paramData, |
235 | 235 | 'original-name' => $paramName, |
236 | 236 | ); |
237 | 237 | } |