Merge "objectcache: convert APC and hash BagOStuff to using mergeViaCas()"
[lhc/web/wiklou.git] / includes / api / ApiUpload.php
index 93e432b..12ecd74 100644 (file)
@@ -542,7 +542,7 @@ class ApiUpload extends ApiBase {
                }
 
                // Check blocks
-               if ( $user->isBlocked() ) {
+               if ( $user->isBlockedFromUpload() ) {
                        $this->dieBlocked( $user->getBlock() );
                }
 
@@ -682,9 +682,7 @@ class ApiUpload extends ApiBase {
                                $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();
                        }