Merge "(bug 47070) check content model namespace on import."
[lhc/web/wiklou.git] / includes / filerepo / file / File.php
index 1c9d8aa..c9e435e 100644 (file)
@@ -583,6 +583,9 @@ abstract class File {
        public function getCommonMetaArray() {
                $handler = $this->getHandler();
 
+               if ( !$handler ) {
+                       return false;
+               }
                return $handler->getCommonMetaArray( $this );
        }
 
@@ -904,7 +907,7 @@ abstract class File {
                        $params['height'] = $height;
                }
                $thumb = $this->transform( $params );
-               if ( is_null( $thumb ) || $thumb->isError() ) {
+               if ( !$thumb || $thumb->isError() ) {
                        return '';
                }