Make sure to always call typeOptions() with a string

(to satisfy Scrutenizer)
This commit is contained in:
nathangray 2017-01-31 08:41:22 -07:00
parent ceea2cb976
commit 71ffd661ac

View File

@ -864,6 +864,10 @@ class Select extends Etemplate\Widget
public static function ajax_get_options($type, $attributes, $value = null) public static function ajax_get_options($type, $attributes, $value = null)
{ {
$no_lang = false; $no_lang = false;
if(is_array($attributes))
{
$attributes = implode(',',$attributes);
}
$options = self::typeOptions($type, $attributes,$no_lang,false,$value); $options = self::typeOptions($type, $attributes,$no_lang,false,$value);
self::fix_encoded_options($options,true); self::fix_encoded_options($options,true);
$response = Api\Json\Response::get(); $response = Api\Json\Response::get();