Empty tags returning null #496

JanPetterMG opened this Issue Nov 27, 2016 · 0 comments


None yet

1 participant

var_dump($item->get_categories()[0]->get_label()); // string(0) ""
var_dump($item->get_description()); // NULL

Until 1.4.3 and #494, the content was handled equally, and the output was the same no matter what tag it originally came from, that's not the case anymore.

Is there any reason for this? If description/content is returning null for empty content, why doesn't the others?

Either should all return null, or @mblaney should fix the introduced bug, so that it doesn't return null for empty content anymore.
In my opinion, null should either be reserved for "non-existing" tags, or be used for all "empty" tags.

This is a generic issue, and applies to most tags, not just <category> and <description>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment