[Mediawiki-l] $wgRequest->getVal('_naw_title')

Brion Vibber brion at wikimedia.org
Wed Aug 29 15:54:12 UTC 2007


Michael Heyder wrote:
> Hi,
> 
> I've a litte question:
> 
> $wgRequest->getVal('_naw_title') result nothing, when
> post-name="_naw_title[]".
> 
> What's going wrong

WebRequest::getVal() returns a string or null. This protects against
type errors from malicious submissions passing unexpected arrays.

If you're dealing explicitly with an array parameter, use
$wgRequest->getArray() to enforce an array-or-null return.

-- brion vibber (brion @ wikimedia.org)



More information about the MediaWiki-l mailing list