}
$value = $this->getMain()->getCheck( $encParamName );
+ $provided = $value;
} elseif ( $type == 'upload' ) {
if ( isset( $default ) ) {
// Having a default value is not allowed
self::dieDebug( __METHOD__, "Multi-values not supported for $encParamName" );
}
$value = $this->getMain()->getUpload( $encParamName );
+ $provided = $value->exists();
if ( !$value->exists() ) {
// This will get the value without trying to normalize it
// (because trying to normalize a large binary file
}
} else {
$value = $this->getMain()->getVal( $encParamName, $default );
+ $provided = $this->getMain()->getCheck( $encParamName );
if ( isset( $value ) && $type == 'namespace' ) {
$type = MWNamespace::getValidNamespaces();
}
// Set a warning if a deprecated parameter has been passed
- if ( $deprecated && $value !== false ) {
+ if ( $deprecated && $provided ) {
$feature = $encParamName;
$m = $this;
while ( !$m->isMain() ) {
}
// Set a warning if a deprecated parameter value has been passed
- $usedDeprecatedValues = $deprecatedValues && $value !== false
+ $usedDeprecatedValues = $deprecatedValues && $provided
? array_intersect( array_keys( $deprecatedValues ), (array)$value )
: [];
if ( $usedDeprecatedValues ) {