From: Sam Reed Date: Wed, 12 Jan 2011 01:17:31 +0000 (+0000) Subject: Not sure why I originally used array_key_exists(). Switch for isset() X-Git-Tag: 1.31.0-rc.0~32606 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=135d0998b6e539d7696c322962176c0fa3dd9477;p=lhc%2Fweb%2Fwiklou.git Not sure why I originally used array_key_exists(). Switch for isset() --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 0f1d63dac8..89689d80c2 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -190,15 +190,15 @@ class ApiQuery extends ApiBase { * @return mixed string or null */ function getModuleType( $moduleName ) { - if ( array_key_exists ( $moduleName, $this->mQueryPropModules ) ) { + if ( isset( $this->mQueryPropModules[$moduleName] ) ) { return 'prop'; } - if ( array_key_exists ( $moduleName, $this->mQueryListModules ) ) { + if ( isset( $this->mQueryListModules[$moduleName] ) ) { return 'list'; } - if ( array_key_exists ( $moduleName, $this->mQueryMetaModules ) ) { + if ( isset( $this->mQueryMetaModules[$moduleName] ) ) { return 'meta'; }