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

Affected version
2.1.0

Jake B.

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

PHP:
$structure->contentType = 'report';
in getStructure
 

Xon

Well-known member
Same applies to \XF\Entity\ReportComment::getEntityContentType(), forgot to report that when I ported my Report Improvements add-on
 

Chris D

XenForo developer
Staff member
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.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
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