CHtml:  fix throw notice in encode function

if variable $text in function encode is array