}
// Check blocks
- if ( $user->isBlocked() ) {
+ if ( $user->isBlockedFromUpload() ) {
$this->dieBlocked( $user->getBlock() );
}
$warning = $warnings['exists'];
unset( $warnings['exists'] );
/** @var LocalFile $localFile */
- $localFile = isset( $warning['normalizedFile'] )
- ? $warning['normalizedFile']
- : $warning['file'];
+ $localFile = $warning['normalizedFile'] ?? $warning['file'];
$warnings[$warning['warning']] = $localFile->getName();
}