Fixed Unable to delete resource reviews of deleted members


XenForo moderator
Staff member
Affected version
As title:

InvalidArgumentException: Attempted to convert NULL to string/binary [content_username] in src/XF/Mvc/Entity/Entity.php at line 740

    XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 618
    XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 548
    XF\Mvc\Entity\Entity->__set() in src/addons/XFRM/ModeratorLog/ResourceRating.php at line 51
    XFRM\ModeratorLog\ResourceRating->setupLogEntityContent() in src/XF/ModeratorLog/AbstractHandler.php at line 67
    XF\ModeratorLog\AbstractHandler->log() in src/XF/ModeratorLog/AbstractHandler.php at line 47
    XF\ModeratorLog\AbstractHandler->logChange() in src/XF/ModeratorLog/Logger.php at line 62
    XF\ModeratorLog\Logger->logChanges() in src/XF/Logger.php at line 47
    XF\Logger->logModeratorChanges() in src/addons/XFRM/Entity/ResourceRating.php at line 288
    XFRM\Entity\ResourceRating->_postSave() in src/XF/Mvc/Entity/Entity.php at line 1208
    XF\Mvc\Entity\Entity->save() in src/addons/XFRM/Entity/ResourceRating.php at line 423
    XFRM\Entity\ResourceRating->softDelete() in src/addons/XFRM/Service/ResourceRating/Delete.php at line 59
    XFRM\Service\ResourceRating\Delete->delete() in src/addons/XFRM/Pub/Controller/ResourceReview.php at line 54
    XFRM\Pub\Controller\ResourceReview->actionDelete() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 262
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in index.php at line 20
I think this applies to XF's moderator log feature rather than just XFMG specific. XFMG just hits it because it doesn't store the username explicitly in some places, so the lack of a user means a lack of username
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFRM release (2.1.6).

Change log:
Fixed an issue preventing reviews made by deleted members from being deleted.
There may be a delay before changes are rolled out to the XenForo Community.
Top Bottom