r80574 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80573‎ | r80574 | r80575 >
Date:17:25, 19 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed warning when using map inputs in forms
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php
@@ -110,8 +110,15 @@
111111
112112 $validator = new Validator( 'form', false ); // TODO
113113
114 - $validator->setParameters( $mapProperties, $parameterInfo );
 114+ $parameters = array();
 115+ foreach ( $mapProperties as $param ) {
 116+ if ( !is_array( $param ) && !is_object( $param ) ) {
 117+ $parameters[] = $param;
 118+ }
 119+ }
115120
 121+ $validator->setParameters( $parameters, $parameterInfo );
 122+
116123 $validator->validateParameters();
117124
118125 $fatalError = $validator->hasFatalError();

Status & tagging log