src/View/Helper/GravatarHelper.php
protected function _cleanOptions($options) {
		if (!isset($options['size']) || empty($options['size']) || !is_numeric($options['size'])) {
			unset($options['size']);
		} else {
			$options['size'] = min(max($options['size'], 1), 512);
		}

		if (!$options['rating'] || !in_array(mb_strtolower($options['rating']), $this->_allowedRatings)) {
			unset($options['rating']);
		}

		if (!$options['default']) {
			unset($options['default']);
		} else {
			if (!in_array($options['default'], $this->_defaultIcons) && !Validation::url($options['default'])) {
				unset($options['default']);
			}
		}
		return $options;
	}
protected function _cleanOptions($options) {
		if (!isset($options['size']) || empty($options['size']) || !is_numeric($options['size'])) {
			unset($options['size']);
		} else {
			$options['size'] = min(max($options['size'], 1), 512);
		}

		if (!$options['rating'] || !in_array(mb_strtolower($options['rating']), $this->_allowedRatings)) {
			unset($options['rating']);
		}

		if (!$options['default']) {
			unset($options['default']);
		} else {
			if (!in_array($options['default'], $this->_defaultIcons) && !Validation::url($options['default'])) {
				unset($options['default']);
			}
		}
		return $options;
	}
protected function _cleanOptions ( $ options ) { if ( ! isset ( $ options [ 'size' ] ) || empty ( $ options [ 'size' ] ) || ! is_numeric ( $ options [ 'size' ] ) ) { unset ( $ options [ 'size' ] ) ; } else { $ options [ 'size' ] = min ( max ( $ options [ 'size' ] , 1 ) , 512 ) ; } if ( ! $ options [ 'rating' ] || ! in_array ( mb_strtolower ( $ options [ 'rating' ] ) , $ this -> _allowedRatings ) ) { unset ( $ options [ 'rating' ] ) ; } if ( ! $ options [ 'default' ] ) { unset ( $ options [ 'default' ] ) ; } else { if ( ! in_array ( $ options [ 'default' ] , $ this -> _defaultIcons ) && ! Validation :: url ( $ options [ 'default' ] ) ) { unset ( $ options [ 'default' ] ) ; } } return $ options ; }
Sanitize the options array

@param array $options Array of options, keyed from default settings
@return array Clean options array
Sanitize the options array