* @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 );
+ }
+ wfWarn( __METHOD__ . ": Key passed isn't a string or an integer.", 2 );
+ return false;
}
/**