Update formatting
[lhc/web/wiklou.git] / includes / filerepo / file / File.php
index 1c9d8aa..950baea 100644 (file)
@@ -97,10 +97,10 @@ abstract class File {
        /** @var Title|string|bool */
        protected $title;
 
-       /** @var string Text of last error  */
+       /** @var string Text of last error */
        protected $lastError;
 
-       /** @var string Main part of the title, with underscores (Title::getDBkey)  */
+       /** @var string Main part of the title, with underscores (Title::getDBkey) */
        protected $redirected;
 
        /** @var Title */
@@ -583,6 +583,10 @@ abstract class File {
        public function getCommonMetaArray() {
                $handler = $this->getHandler();
 
+               if ( !$handler ) {
+                       return false;
+               }
+
                return $handler->getCommonMetaArray( $this );
        }
 
@@ -904,7 +908,7 @@ abstract class File {
                        $params['height'] = $height;
                }
                $thumb = $this->transform( $params );
-               if ( is_null( $thumb ) || $thumb->isError() ) {
+               if ( !$thumb || $thumb->isError() ) {
                        return '';
                }
 
@@ -1325,7 +1329,7 @@ abstract class File {
                $this->assertRepoDefined();
 
                return $this->repo->getZonePath( 'thumb' ) . '/' .
-                       $this->getArchiveThumbRel( $archiveName, $suffix );
+               $this->getArchiveThumbRel( $archiveName, $suffix );
        }
 
        /**