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