Skip to content

Commit

Permalink
wrong return type causes whitescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
rpnykanen committed Jan 21, 2025
1 parent faf583f commit 2c62132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/helfi_media_map/src/Entity/HelMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Drupal\helfi_media_map\Entity;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\helfi_media\Entity\MediaEntityBundle;
use Drupal\media\MediaInterface;

Expand All @@ -27,10 +28,10 @@ public function getServiceUrl(): ?string {
/**
* Get the title of map.
*
* @return string|null
* @return \Drupal\Core\StringTranslation\TranslatableMarkup|null
* The title of the map.
*/
public function getMediaTitle(): ?string {
public function getMediaTitle(): ?TranslatableMarkup {
return $this->get('field_media_hel_map')
->first()
->get('title')
Expand Down

0 comments on commit 2c62132

Please sign in to comment.