Skip to content

Commit

Permalink
Fix contao bug description label
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Apr 25, 2024
1 parent 1ad13e5 commit c5be841
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Subscribers/WidgetSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ public function handleGetAttributesFromDca(GetAttributesFromDcaEvent $event): vo
);

// Bugfix: Contao does not validate for label array when determining the description.
if (strlen($result['description']) === 1 && !\is_array($event->getFieldConfiguration()['label'] ?? null)) {
if (
strlen((string) $result['description']) === 1
&& !\is_array($event->getFieldConfiguration()['label'] ?? null)
) {
$result['description'] = '';
}

Expand Down

0 comments on commit c5be841

Please sign in to comment.