BuddyDev

Search

[Resolved] Profanity filter causing fatal error

  • Participant
    Shaun King on #53165

    Hi, we’re using the Profanity Filter with BuddyBoss and XProfile fields.

    We were having the error when a Member Saved editing their Profile fields. The website would report a Critical error had occurred.
    If you then used the back button on the browser, all the fields were still populated and actually saved. But if you tried hitting the Save button again, the page would report an error.

    So my tech found and reported this to me:

    Buddydev’s profanity filter is causing the critical error, it needs this fix added at line 103, I’ve fixed in our copy but can you report to them.

    //check if $content is an array
    ‘ if ( is_array( $content ) ) {
    $content = implode( ‘ ‘, $content );
    } ‘
    And the error its causing to tell them is “PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /home2/xxxxxxx/domains/xxxx.com.au/public_html/wp-content/plugins/buddypress-profanity-filter/src/core/bppf-filter-functions.php:104”

    Can you confirm and make update to plugin

  • Keymaster
    (BuddyDev Team)
    Posts: 24501
    Brajesh Singh on #53170

    Hi Shaun,
    Thank you for using the plugin.

    I am sorry for the experience. I am looking into the plugin. Will update you in 1 hour.

    Regards
    Brajesh

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #53172

    Hello Shaun,

    Sorry for the inconvenience. Could you please provide details regarding the field types you are using? It appears that the issue may be related to a specific multi-field that submits values in an array during form submission. I am currently investigating this matter on my development server for further testing.

    Regards
    Ravi

  • Keymaster
    (BuddyDev Team)
    Posts: 24501
    Brajesh Singh on #53173

    Hi Shaun,
    Thank you for your patience.

    We have released an update which fixes it.

    your developer was correct in pointing the issue. If there is an xprofile field with multiple parts( one field with more than 1 input) or repeater field, this might cause issue. The solution was ensure it string.

    Even current update does not account if you have a repeater field with multiple parts(as that would result in nested array) but I don’t think it is needed currently.

    If the plugin still causes any issue, Please let me know and I will assist.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved