Quantcast
Channel: WordPress.org Forums » [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin] Support
Viewing all articles
Browse latest Browse all 5045

Code assumes hook objects to be Closures

$
0
0

Replies: 0

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']).


Viewing all articles
Browse latest Browse all 5045

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>