* Adjust picker items init logic.
This commit is contained in:
@@ -97,9 +97,8 @@ class picker extends wg
|
||||
foreach($items as $key => $item)
|
||||
{
|
||||
if(!is_array($item)) $item = array('text' => $item, 'value' => $key);
|
||||
if(!is_string($item['value'])) $item['value'] = strval($item['value']);
|
||||
|
||||
if($item['value'] === '0') $hasZeroValue = true;
|
||||
if(isset($item['value']) && !is_string($item['value'])) $item['value'] = strval($item['value']);
|
||||
if(isset($item['value']) && $item['value'] === '0') $hasZeroValue = true;
|
||||
if($pinyinKeys && !isset($item['keys']) && class_exists('common')) $item['keys'] = implode(' ', common::convert2Pinyin(array($item['text'])));
|
||||
$pickerItems[] = $item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user