Support » Plugin: AntiSpam for Contact Form 7 » Little code bug

  • This was exposed when a “Drag and Drop Multiple File Upload” field was added to a contact form. Would cause an exception as ‘none’ was being fed into round(); Changing this to 0 fixed the issue.

    --- cf7a-antispam-flamingo.php	(revision 5970)
    +++ cf7a-antispam-flamingo.php	(working copy)
    @@ -333,7 +333,7 @@
    
     			$b8 = new CF7_AntiSpam_B8();
    
    -			$rating = ! empty( $message ) ? round( $b8->cf7a_b8_classify( $message ), 2 ) : 'none';
    +			$rating = ! empty( $message ) ? round( $b8->cf7a_b8_classify( $message ), 2 ) : 0;
    
     			update_post_meta( $result['flamingo_inbound_id'], '_cf7a_b8_classification', round( $rating, 2 ) );
     		}
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Erik

    (@codekraft)

    hello @emilycestmoi !

    Yes you are right, that part is not working correctly and in the next version (that i will release in short) I’ll correct it and leave the numeric value only in case it exists (otherwise don’t save anything).

    Thread Starter emilycestmoi

    (@emilycestmoi)

    Sounds good. Thank you for all your work!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.