Use null coalescing operator

To hide warnings if the 'svg' or 'icon' keys don’t exist.

Bug: T304917
Change-Id: I12c13615f160f1a889b469ef6e4e7561de121d92
isekai
Lucas Werkmeister 3 years ago
parent 9f8e03b666
commit 8082e179ff

@ -532,7 +532,7 @@ class TimelessTemplate extends BaseTemplate {
if ( $part !== 'text' ) { if ( $part !== 'text' ) {
$logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) ); $logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) );
if ( $logoImage === false ) { if ( $logoImage === false ) {
$logoSrc = $logos['svg'] ?: $logos['icon'] ?: ''; $logoSrc = $logos['svg'] ?? $logos['icon'] ?? '';
if ( $logoSrc !== '' ) { if ( $logoSrc !== '' ) {
$logoImage = Html::element( 'img', [ $logoImage = Html::element( 'img', [
'src' => $logoSrc, 'src' => $logoSrc,

Loading…
Cancel
Save