Pierre-Lannoy / wp-decalog

Capture and log events, metrics and traces on your site. Make WordPress observable - finally!
https://perfops.one/
GNU General Public License v3.0
64 stars 9 forks source link

Corelistener - pre_clear_scheduled_hook: Wrong number of arguments #19

Closed JanThiel closed 3 years ago

JanThiel commented 3 years ago

Describe the bug https://github.com/Pierre-Lannoy/wp-decalog/blob/ab0c8898d503ade619f9416b418be6d2471aac76/includes/listeners/class-corelistener.php#L188

5 parameters configured, API only offers 4: https://developer.wordpress.org/reference/functions/wp_clear_scheduled_hook/

    $pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error );

Environment (please complete the following information):

Best, Jan

Pierre-Lannoy commented 3 years ago

Hi Jan! Thanks for the hint. You're right, the signature I used is wrong. In fact, it is not even 4, but 3 parameters... OMG How did I let this go by? Never mind, it will be fixed in the next release, of course...

JanThiel commented 3 years ago

You are very welcome :-) Things happen ;-) And this one doesn't really matter from a functional perspective.

But 4 parameter it is: $pre, $hook, $args, $wp_error. Don't be confused by the 'null' in the apply_filters call.

Best, Jan

Pierre-Lannoy commented 3 years ago

Thanks a lot, @JanThiel !