From: Brad Jorsch Date: Wed, 2 Dec 2015 14:09:08 +0000 (-0500) Subject: API: Add isset() to avoid PHP warning X-Git-Tag: 1.31.0-rc.0~8843 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=bb097d93163a76abe5586c72d105b82823bd4969;p=lhc%2Fweb%2Fwiklou.git API: Add isset() to avoid PHP warning Bug: T120075 Change-Id: I8e4ac665c262e6f889abba24eb2beb4fd5a76d1b --- diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index 77a3a21a94..c841d830a9 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -265,7 +265,9 @@ class ApiFeedWatchlist extends ApiBase { if ( !isset( $p[ApiBase::PARAM_HELP_MSG] ) ) { $p[ApiBase::PARAM_HELP_MSG] = "apihelp-query+watchlist-param-$from"; } - if ( is_array( $p[ApiBase::PARAM_TYPE] ) && isset( $p[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) { + if ( isset( $p[ApiBase::PARAM_TYPE] ) && is_array( $p[ApiBase::PARAM_TYPE] ) && + isset( $p[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) + ) { foreach ( $p[ApiBase::PARAM_TYPE] as $v ) { if ( !isset( $p[ApiBase::PARAM_HELP_MSG_PER_VALUE][$v] ) ) { $p[ApiBase::PARAM_HELP_MSG_PER_VALUE][$v] = "apihelp-query+watchlist-paramvalue-$from-$v";