Fix IconPicker widget if value is null with PHP 8 (#6972)

This commit is contained in:
Marc Farré 2024-04-29 15:12:21 +02:00 committed by GitHub
parent 2f24ad5dd0
commit 76a30f934c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ class IconPicker extends Select2
*/
public function run()
{
$this->value = (strpos($this->value, 'fa-') === 0)
$this->value = (strpos((string)$this->value, 'fa-') === 0)
? substr($this->value, 3, strlen($this->value))
: $this->value;