Use substr instead of str_starts_with to avoid PHP 8.0

This commit is contained in:
nathan 2022-07-15 13:40:18 -06:00
parent 3e83c5bb1c
commit 4256b589e7

View File

@ -560,7 +560,7 @@ class Select extends Etemplate\Widget
{
$widget = $widget_type;
$widget_type = $widget->attrs['type'] ? $widget->attrs['type'] : $widget->type;
if(str_starts_with($widget_type, 'et2-'))
if(substr($widget_type, 0, 4) == 'et2-')
{
$widget_type = str_replace('et2-', '', $widget_type);
}