mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Fixed exception related to strict types.
This commit is contained in:
parent
0fd677d2fd
commit
9dc5d325da
1 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,11 @@ class EventCommentHelper
|
|||
public function setMessage(?string $message): void
|
||||
{
|
||||
//Restrict the length of the string
|
||||
$this->message = mb_strimwidth($message, 0, self::MAX_MESSAGE_LENGTH, '...');
|
||||
if ($message) {
|
||||
$this->message = mb_strimwidth($message, 0, self::MAX_MESSAGE_LENGTH, '...');
|
||||
} else {
|
||||
$this->message = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue