1. 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)

Discussion in 'Resolved Bug Reports' started by Daniel Hood, Jan 27, 2015.

  1. Daniel Hood

    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.
    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.
     
  2. Mike

    Mike XenForo Developer Staff Member

    Looks ok with that, so changed.
     
    Daniel Hood likes this.

Share This Page