• Resolved bfksoql

    (@bfksoql)


    Yesterday I need to replace code in plugins/wp-mail-smtp/src/Processor.php
    line 216 – there was:

    // Return FROM EMAIL if forced in settings.
    if ( $forced & ! empty( $from_email ) ) {
    return $from_email;
    }

    Is it realy ok ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @bfksoql,

    thanks for pointing this out. Indeed it should be ‘&&’ and we made the change, so this will be fixed in the next release.

    However, the condition should still work just OK, because the bit comparison (single ‘&’) resolves correctly in this case:
    true & true = 1
    true & false = 0
    false & false = 0
    false & true = 0

    The code in our plugin should execute just OK. Or did you have any particular issues with this if statement?

    Take care!

    Thread Starter bfksoql

    (@bfksoql)

    I have an error about joining boolean & string when doing mass status update with wp-cli and it was trigger sending email. I have a lot of custom code so I don`t know if this will have impact on other plugin users. I just bugfix this file and my system work ok.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @bfksoql,

    thanks for letting us know.

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘& instead of && in code ?’ is closed to new replies.