Upgrade to 3.9.0
This commit is contained in:
@@ -62,7 +62,10 @@ class Field extends Component
|
||||
public function __construct(string $type, array $attrs = [], ?Fields $formFields = null)
|
||||
{
|
||||
if (isset(static::$types[$type]) === false) {
|
||||
throw new InvalidArgumentException('The field type "' . $type . '" does not exist');
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'field.type.missing',
|
||||
'data' => ['name' => $attrs['name'] ?? '-', 'type' => $type]
|
||||
]);
|
||||
}
|
||||
|
||||
if (isset($attrs['model']) === false) {
|
||||
|
||||
@@ -324,9 +324,7 @@ class Form
|
||||
return $fields;
|
||||
}
|
||||
|
||||
if ($language === null) {
|
||||
$language = $kirby->language()->code();
|
||||
}
|
||||
$language ??= $kirby->language()->code();
|
||||
|
||||
if ($language !== $kirby->defaultLanguage()->code()) {
|
||||
foreach ($fields as $fieldName => $fieldProps) {
|
||||
|
||||
Reference in New Issue
Block a user