Hi Lucas.
I’ve Looked into the code now and think it isn’t that hard to solve myself. It seems that the plugin developer has just got the arguments of the in_array() function switched.
The warning is generated by the use of in_array in following code:
function mca_email_poked_ones( $comment_id, $approved ) {
if( add_filter( 'mca_send_email_on_mention', true ) && in_array( array( 1, 'approve' ), $approved ) ) {
As you can see the second parameter ($approved) is passed through by the caller of mca_email_poked_ones.
The only call of the function mca_email_poked_ones I could find is in line 277, which says:
mca_email_poked_ones( $comment_id, 1 );
The second parameter being the integer 1.
The syntax of in_array being
in_array(term_to_search_for,array,type)
Changing line 249 to
if( add_filter( 'mca_send_email_on_mention', true ) && in_array( $approved, array( 1, 'approve' ) ) ) {
should do the trick. Line 249 probably just wants to check if $approved is either 1 or ‘approve’.
Hope it helps.
Hans
-
This reply was modified 8 years, 5 months ago by
Hans Schuijff. Reason: typo