• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Code Redudency (Warning Members)

Daniel Hood

Well-known member
I was just looking at XenForo_ControllerPublic_Member::actionWarn() and noticed some redudency;

At line 788, the warnings get prepared.
$warnings = $warningModel->prepareWarningDefinitions($warningModel->getWarningDefinitions());
At line 800, the warning selected gets prepared again:
$warning = $warningModel->prepareWarningDefinition($warnings[$dwInput['warning_definition_id']]);
Unless I'm missing something, just using $warning[$dwInput['warning_definition_id']] would produce the same result.