GEWIS / gewisweb

GEWIS Website

Home Page:https://gewis.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Markdown` view helper does not allow `null` for `text` argument

tomudding opened this issue · comments

Current behaviour

A lot of historical data of activities does not have correct localisation, as such null is always passed to

public function __invoke(
string $text,
bool $company = false,
): string {

This is not allowed and a 500 is returned.

Desired behaviour

Allow null and automatically change it to '' (empty string).

Steps to reproduce

https://gewis.nl/en/activity/view/2063

Website version

latest

What operating are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Other information

No response

Perhaps it is actually better to change the LocaliseText view helper instead. Never have it return null but '' (empty string) instead.