Skip to content

Commit

Permalink
Merge branch '4.x' of https://github.com/craftcms/cms into 5.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci.yml
#	CHANGELOG.md
  • Loading branch information
brandonkelly committed Sep 5, 2024
2 parents 46c547f + 8f049c9 commit c7fe6c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 5

## Unreleased

- Fixed a bug where `craft\helpers\StringHelper::lines()` was returning an array of `Stringy\Stringy` objects, rather than strings.
- Fixed styling issues with Template field layout UI elements’ selector labels.

## 5.4.1 - 2024-09-04

- Fixed a bug where element chips within thumbnail views weren’t getting light gray backgrounds. ([#15649](https://github.com/craftcms/cms/issues/15649))
Expand Down
2 changes: 1 addition & 1 deletion src/fieldlayoutelements/BaseUiElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function selectorHtml(): string
Html::endTag('div') . // .fld-element-icon
Html::beginTag('div', ['class' => 'field-name']) .
Html::beginTag('div', ArrayHelper::merge(
['class' => 'fld-element-label'],
['class' => ['fld-element-label']],
$this->selectorLabelAttributes(),
)) .
Html::tag('h4', Html::encode($label)) .
Expand Down
8 changes: 1 addition & 7 deletions src/helpers/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,13 +915,7 @@ public static function lineWrapAfterWord(string $str, int $limit): string
public static function lines(string $str): array
{
$lines = BaseStringy::create($str)->lines();

foreach ($lines as $i => $line) {
$lines[$i] = $line;
}

/** @var string[] $lines */
return $lines;
return array_map(fn(BaseStringy $line) => (string)$line, $lines);
}

/**
Expand Down

0 comments on commit c7fe6c5

Please sign in to comment.