X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilebackend%2FFSFile.php;h=6311f766da78a7f4bcf7bbadee139d75dd62feb3;hb=687dc7cf57bdc74a80b2ae3176cda1facd535ee9;hp=a75f32851f991909a1b523191ff63e33c139c4c6;hpb=1716c357af8b14380baede958b489986221f36f7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filebackend/FSFile.php b/includes/filebackend/FSFile.php index a75f32851f..6311f766da 100644 --- a/includes/filebackend/FSFile.php +++ b/includes/filebackend/FSFile.php @@ -131,7 +131,7 @@ class FSFile { # Height, width and metadata $handler = MediaHandler::getHandler( $info['mime'] ); if ( $handler ) { - $tempImage = (object)array(); // XXX (hack for File object) + $tempImage = (object)[]; // XXX (hack for File object) $info['metadata'] = $handler->getMetadata( $tempImage, $this->path ); $gis = $handler->getImageSize( $tempImage, $this->path, $info['metadata'] ); if ( is_array( $gis ) ) { @@ -154,7 +154,7 @@ class FSFile { * @return array */ public static function placeholderProps() { - $info = array(); + $info = []; $info['fileExists'] = false; $info['mime'] = null; $info['media_type'] = MEDIATYPE_UNKNOWN; @@ -174,7 +174,7 @@ class FSFile { * @return array */ protected function extractImageSizeInfo( array $gis ) { - $info = array(); + $info = []; # NOTE: $gis[2] contains a code for the image type. This is no longer used. $info['width'] = $gis[0]; $info['height'] = $gis[1]; @@ -200,7 +200,6 @@ class FSFile { public function getSha1Base36( $recache = false ) { if ( $this->sha1Base36 !== null && !$recache ) { - return $this->sha1Base36; } @@ -209,7 +208,7 @@ class FSFile { MediaWiki\restoreWarnings(); if ( $this->sha1Base36 !== false ) { - $this->sha1Base36 = wfBaseConvert( $this->sha1Base36, 16, 36, 31 ); + $this->sha1Base36 = Wikimedia\base_convert( $this->sha1Base36, 16, 36, 31 ); } return $this->sha1Base36;