From: Sam Reed Date: Mon, 25 Apr 2011 22:56:08 +0000 (+0000) Subject: * (bug 28702) Undefined offset in ApiParamInfo.php X-Git-Tag: 1.31.0-rc.0~30550 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6d118609c1809249fe1ff04e004a489d69146498;p=lhc%2Fweb%2Fwiklou.git * (bug 28702) Undefined offset in ApiParamInfo.php Followup r85758 (bug 28254) If no DFLT is set, fall back to "null", which means a string parameter --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4b5ceabeee..2a032cb163 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -352,6 +352,7 @@ PHP if you have not done so prior to upgrading MediaWiki. * (bug 26882) Allow listing of indefinite protections with the api * (bug 27344) add drprefix param to list=deletedrevs * (bug 28560) list=deletedrevs should die, if combination of param is invalid +* (bug 28702) Undefined offset in ApiParamInfo.php === Languages updated in 1.18 === diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index ac91ea3d92..ed3b450de4 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -131,7 +131,7 @@ class ApiParamInfo extends ApiBase { //handle missing type if ( !isset( $p[ApiBase::PARAM_TYPE] ) ) { - $dflt = $p[ApiBase::PARAM_DFLT]; + $dflt = isset( $p[ApiBase::PARAM_DFLT] ) ? $p[ApiBase::PARAM_DFLT] : null; if ( is_bool( $dflt ) ) { $p[ApiBase::PARAM_TYPE] = 'bool'; } elseif ( is_string( $dflt ) || is_null( $dflt ) ) {