mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +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
|
public function setMessage(?string $message): void
|
||||||
{
|
{
|
||||||
//Restrict the length of the string
|
//Restrict the length of the string
|
||||||
|
if ($message) {
|
||||||
$this->message = mb_strimwidth($message, 0, self::MAX_MESSAGE_LENGTH, '...');
|
$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