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

This commit is contained in:
Thaissa Mendes 2018-02-09 09:49:03 -02:00
parent 044971c6cf
commit 4cfae43fad

View File

@ -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);