- if ( isset( $extension['license-name'] ) ) {
- $licenseLink = Linker::link(
- $this->getPageTitle( 'License/' . $extensionName ),
- $out->parseInline( $extension['license-name'] ),
- array(
- 'class' => 'mw-version-ext-license',
- 'dir' => 'auto',
- )
- );
- } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
- $licenseLink = Linker::link(
- $this->getPageTitle( 'License/' . $extensionName ),
- $this->msg( 'version-ext-license' ),
- array(
- 'class' => 'mw-version-ext-license',
- 'dir' => 'auto',
- )
- );
+ if ( isset( $extension['name'] ) ) {
+ $licenseName = null;
+ if ( isset( $extension['license-name'] ) ) {
+ $licenseName = $out->parseInline( $extension['license-name'] );
+ } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
+ $licenseName = $this->msg( 'version-ext-license' );
+ }
+ if ( $licenseName !== null ) {
+ $licenseLink = Linker::link(
+ $this->getPageTitle( 'License/' . $extension['name'] ),
+ $licenseName,
+ array(
+ 'class' => 'mw-version-ext-license',
+ 'dir' => 'auto',
+ )
+ );
+ }