Merge "auth: Follow up on e907d4328dc3e"
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index dcebb60..c7dbf83 100644 (file)
@@ -98,11 +98,7 @@ abstract class UploadBase {
                        self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
                        self::FILENAME_TOO_LONG => 'filename-toolong',
                ];
-               if ( isset( $code_to_status[$error] ) ) {
-                       return $code_to_status[$error];
-               }
-
-               return 'unknown-error';
+               return $code_to_status[$error] ?? 'unknown-error';
        }
 
        /**
@@ -1348,7 +1344,7 @@ abstract class UploadBase {
                }
 
                foreach ( $tags as $tag ) {
-                       if ( false !== strpos( $chunk, $tag ) ) {
+                       if ( strpos( $chunk, $tag ) !== false ) {
                                wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
 
                                return true;