MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/176515
Change subject: Verify parameter for MapCacheLRU::has() can be passed to array_key_exists() ...................................................................... Verify parameter for MapCacheLRU::has() can be passed to array_key_exists() This prevents warnings from PHP from array_key_exists(). Change-Id: I2b36b7a3b96b37e29fe06f69c13a185b3ec592a7 Phabricator: https://phabricator.wikimedia.org/T76305 --- M includes/libs/MapCacheLRU.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/176515/1 diff --git a/includes/libs/MapCacheLRU.php b/includes/libs/MapCacheLRU.php index 2a7ee2a..1090324 100644 --- a/includes/libs/MapCacheLRU.php +++ b/includes/libs/MapCacheLRU.php @@ -74,7 +74,9 @@ * @return bool */ public function has( $key ) { - return array_key_exists( $key, $this->cache ); + if ( is_string( $key ) || is_integer( $key ) ) { + return array_key_exists( $key, $this->cache ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/176515 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b36b7a3b96b37e29fe06f69c13a185b3ec592a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarkAHershberger <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
