Skip to content

Commit

Permalink
using getApp() in Text constructor is problematic
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Nov 27, 2024
1 parent 5b5933c commit ac3de5c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@ class Text extends View

public $content = '';

public function __construct($label = [])
{
$defaults = is_array($label) ? $label : [$label];

if (array_key_exists(0, $defaults)) {
$defaults[0] = $this->getApp()->encodeHtml($defaults[0]);
}

parent::__construct($defaults);
}

#[\Override]
public function renderToHtml(): string
{
Expand Down

0 comments on commit ac3de5c

Please sign in to comment.