From bb097d93163a76abe5586c72d105b82823bd4969 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 2 Dec 2015 09:09:08 -0500 Subject: [PATCH] API: Add isset() to avoid PHP warning Bug: T120075 Change-Id: I8e4ac665c262e6f889abba24eb2beb4fd5a76d1b --- includes/api/ApiFeedWatchlist.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; -- 2.20.1