Skip to content
Snippets Groups Projects
Commit 41668d04 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent TypeError in file related webhook messages

Since FileInterface->getPublicUrl() might return
`NULL`, corresponding constructor arguments are
updated to now expect `?string`.

Resolves: #103051
Releases: main, 12.4
Change-Id: I8d16c6b9361694733dc2c5c4b2e69693fe25cff4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82979


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 0882218a
Branches
Tags
No related merge requests found
......@@ -35,7 +35,7 @@ final class FileAddedMessage implements WebhookMessageInterface
public function __construct(
private readonly int $storageUid,
private readonly string $identifier,
private readonly string $publicUrl
private readonly ?string $publicUrl
) {}
public static function createFromEvent(AfterFileAddedEvent $event): self
......
......@@ -35,7 +35,7 @@ final class FileRemovedMessage implements WebhookMessageInterface
public function __construct(
private readonly int $storageUid,
private readonly string $identifier,
private readonly string $publicUrl
private readonly ?string $publicUrl
) {}
public static function createFromEvent(BeforeFileDeletedEvent $event): self
......
......@@ -33,7 +33,7 @@ final class FileUpdatedMessage implements WebhookMessageInterface
public function __construct(
private readonly int $storageUid,
private readonly string $identifier,
private readonly string $publicUrl,
private readonly ?string $publicUrl,
private readonly array $relevantProperties,
private readonly array $updatedFields
) {}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment