r86917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86916‎ | r86917 | r86918 >
Date:22:56, 25 April 2011
Author:reedy
Status:ok
Tags:
Comment:
* (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
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiParamInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParamInfo.php
@@ -131,7 +131,7 @@
132132
133133 //handle missing type
134134 if ( !isset( $p[ApiBase::PARAM_TYPE] ) ) {
135 - $dflt = $p[ApiBase::PARAM_DFLT];
 135+ $dflt = isset( $p[ApiBase::PARAM_DFLT] ) ? $p[ApiBase::PARAM_DFLT] : null;
136136 if ( is_bool( $dflt ) ) {
137137 $p[ApiBase::PARAM_TYPE] = 'bool';
138138 } elseif ( is_string( $dflt ) || is_null( $dflt ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -352,6 +352,7 @@
353353 * (bug 26882) Allow listing of indefinite protections with the api
354354 * (bug 27344) add drprefix param to list=deletedrevs
355355 * (bug 28560) list=deletedrevs should die, if combination of param is invalid
 356+* (bug 28702) Undefined offset in ApiParamInfo.php
356357
357358 === Languages updated in 1.18 ===
358359

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85758* (bug 28254) action=paraminfo: Extract type from PARAM_DFLT if PARAM_TYPE is...reedy13:01, 10 April 2011

Status & tagging log