From fe66ef26cd3eb6415f3d8c8d93342d403c40ff82 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 18 Jun 2010 09:30:38 +0000 Subject: [PATCH] (bug 24016) API: Handle parameters specified in simple string syntax ( 'paramname' => 'defaultval' ) correctly when outputting help. Patch by Brad Jorsch. --- includes/api/ApiBase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index a89f41fad3..f9ac106f5f 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -294,6 +294,12 @@ abstract class ApiBase { $desc = implode( $paramPrefix, $desc ); } + if ( !is_array( $paramSettings ) ) { + $paramSettings = array( + self::PARAM_DFLT => $paramSettings, + ); + } + $deprecated = isset( $paramSettings[self::PARAM_DEPRECATED] ) ? $paramSettings[self::PARAM_DEPRECATED] : false; if ( $deprecated ) { -- 2.20.1