Code assumes hook objects to be Closures
-
The
hide_unrelated_noticesmethod of theWPMailSMTP\Admin\Areaclass iterates over registered hooks and, if the hook is an object, assumes it is an instance of the classClosure. 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 useis_callable($arr['function']).The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Code assumes hook objects to be Closures’ is closed to new replies.