• The hide_unrelated_notices method of the WPMailSMTP\Admin\Area class iterates over registered hooks and, if the hook is an object, assumes it is an instance of the class Closure. This, however, does not account for objects with an __invoke() method, which may be called as functions.

    Instead of $arr['function'] instanceof \Closure, it would be nicer to use is_callable($arr['function']).

    The page I need help with: [log in to see the link]

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

    (@capuderg)

    Hi @leonboot,

    thanks for sharing this with us. We’ll look into it and update it in one of the next plugin updates.

    Could you please let us know in which use case this has caused issues for you, so we can also test it out and make sure it works OK after the changes?

    Thank you again and have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘Code assumes hook objects to be Closures’ is closed to new replies.