Avoid warning about $field['type2'] already array by checking before exploding

This commit is contained in:
Nathan Gray 2014-03-06 21:59:48 +00:00
parent 8a3cda964e
commit 11e01aaa41

View File

@ -304,7 +304,7 @@ class infolog_bo
foreach($this->customfields as $field)
{
if ((!$type || empty($field['type2']) || in_array($type,explode(',',$field['type2']))) &&
if ((!$type || empty($field['type2']) || in_array($type,is_array($field['type2']) ? $field['type2'] : explode(',',$field['type2']))) &&
(!$links || in_array($field['type'],$link_types)))
{
return True;