Avoid warning from explode() if type2 is already an array

This commit is contained in:
Nathan Gray 2014-06-11 17:33:19 +00:00
parent 80962c1963
commit 44ae90b8d3

View File

@ -236,7 +236,7 @@ class config
foreach($cfs as $name => $field)
{
if (!$all_private_too && $field['private'] && !self::_check_private_cf($field['private']) ||
$only_type2 && $field['type2'] && !in_array($only_type2, explode(',', $field['type2'])))
$only_type2 && $field['type2'] && !in_array($only_type2, is_array($field['type2']) ? $field['type2'] : explode(',', $field['type2'])))
{
unset($cfs[$name]);
}