Closed fatcrobat closed 5 years ago
From what I can see in the code the stdClass
is not supported at all. Thus I would rather tend to throw an exception if an object is passed. @aschempp ?
well an error is already thrown by PHP. The argument docs clearly say you should pass a string or array, so not sure if we really need to change anything?
Hmm true, the result would be the same in the end. I am closing this one then.
If for example Haste\Util\StringUtil::convertToText(object(stdClass), 3) is called, preg_match_all will throw an error. Can you add an is_string() check?
https://github.com/codefog/contao-haste/blob/4af49bc85b225904bfeafcd776d4bddd74197004/library/Haste/Util/StringUtil.php#L112