From 4cfae43fad70a03ee72d14610fee6131c31d262b Mon Sep 17 00:00:00 2001 From: Thaissa Mendes Date: Fri, 9 Feb 2018 09:49:03 -0200 Subject: [PATCH] When using LanguageDropdownField on searchable_fields, it doesn't get instantiated with title parameter - and as DropdownField class doesn't require it, we should make it optional --- code/forms/LanguageDropdownField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/forms/LanguageDropdownField.php b/code/forms/LanguageDropdownField.php index d81a1b8..41eb316 100755 --- a/code/forms/LanguageDropdownField.php +++ b/code/forms/LanguageDropdownField.php @@ -21,7 +21,7 @@ class LanguageDropdownField extends GroupedDropdownField { * @param string $list Indicates the source language list. * Can be either Common-English, Common-Native, Locale-English, Locale-Native */ - function __construct($name, $title, $excludeLocales = array(), + function __construct($name, $title=null, $excludeLocales = array(), $translatingClass = 'SiteTree', $list = 'Common-English', $instance = null ) { $usedLocalesWithTitle = Translatable::get_existing_content_languages($translatingClass);