We don't need to filter the array. This was added to strip empty array items that you sometimes get casting to an array. But get the terms will return array() or false. And (array) false gives you array(). No need to filter.
Got confused with casting null to an array. This to an array gives array( 0 => false ); because ¯(ツ)/¯
Thought I'd pushed this commit to https://github.com/humanmade/Simple-Instant-Articles-for-Facebook/pull/37/files
We don't need to filter the array. This was added to strip empty array items that you sometimes get casting to an array. But get the terms will return
array()
orfalse
. And(array) false
gives youarray()
. No need to filter.Got confused with casting
null
to an array. This to an array givesarray( 0 => false );
because ¯(ツ)/¯