Fixed \XF\Entity\Report::getEntityContentType() returns NULL

Jake B.

Well-known member
Affected version
If you run getEntityContentType() on a report it returns NULL. Just missing the

$structure->contentType = 'report';
in getStructure
Same applies to \XF\Entity\ReportComment::getEntityContentType(), forgot to report that when I ported my Report Improvements add-on
In some cases these aren't necessarily bugs, as such. I think the report case is, but generally an entity structure would only have a contentType if it has any content type fields or we'd expect content type fields to be useful.

We're adding both regardless, but just something to bear in mind.
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Add contentType values to the Report/ReportComment entity structure.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
Top Bottom