• I just installed BP Message Attachment. I get the following errors if I attach a file.

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/radius7/public_html/students/wp-content/plugins/buddypress-message-attachment/includes/actions.php on line 113 and defined in /home/radius7/public_html/students/wp-includes/wp-db.php on line 1147

    Warning: Cannot modify header information – headers already sent by (output started at /home/radius7/public_html/students/wp-includes/wp-db.php:1147) in /home/radius7/public_html/students/wp-includes/pluggable.php on line 1121

    I found this article that I think is the fix. http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

    However, I do not know php so I am not exactly sure what to edit to correct it.

    Here is what line 113 currently has.
    function msgat_delete_message($date_sent){
    global $wpdb; global $bp;
    $wpdb->query( $wpdb->prepare( “DELETE FROM {$bp->messages->table_name_messages} WHERE date_sent = ‘”.$date_sent.”‘”) );
    }

    Can anyone help with what the correct query code should be?

    https://wordpress.org/plugins/buddypress-message-attachment/

Viewing 1 replies (of 1 total)
  • If you used spaces between file types allowed remove them and try it again. I can’t remember if my error was exactly like yours, but this fixed it for me. If you have jpg, doc, docx make it jpg,doc,docx

Viewing 1 replies (of 1 total)
  • The topic ‘BP Message Attachments does not work’ is closed to new replies.