• Resolved KevinPlusPlus

    (@kevinplusplus)


    Hello,

    I have found a small issue in the plugin but also offer the solution!

    On my server, we do not have the iconv module installed, so line 751 of bbpress-notify-nospam.php was causing a 500 internal server error. The presence of the iconv function is tested on a later call, but not this call, nor is the $do_enc setting checked either. So, to match the setting check and function check that appears later, the following patch should take care of it:

    replace:

    $enc = iconv_get_encoding( ‘internal_encoding’ );
    $preferences = apply_filters( ‘bbpnns_subject_enc_preferences’,
    array( ‘input-charset’ => $enc, ‘output-charset’ => “UTF-8”, ‘scheme’ => ‘Q’ )
    );

    with this:

    if ( true === $do_enc && function_exists( ‘iconv_get_encoding’ ) )
    {
    $enc = iconv_get_encoding( ‘internal_encoding’ );
    $preferences = apply_filters( ‘bbpnns_subject_enc_preferences’,
    array( ‘input-charset’ => $enc, ‘output-charset’ => “UTF-8”, ‘scheme’ => ‘Q’ )
    );
    }

    This matches a bit later where you DO already have:

    if ( true === $do_enc && function_exists( ‘iconv_mime_encode’ ) )

    I hope that this can make it into the next version to possibly save someone else the troubleshooting of hunting this down.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘iconv_get_encoding error’ is closed to new replies.