WordPress.org

Forums

Antispam Bee
PHP Warnings in Error Log (7 posts)

  1. awhig
    Member
    Posted 1 year ago #

    Hi,

    I'm using the latest version of the plugin with WP 3.6.1. I'm finding these errors in my error log.

    [24-Oct-2013 05:21:40 UTC] PHP Warning: preg_match() [function.preg-match]: Compilation failed: invalid UTF-8 string at offset 0 in [....]/plugins/antispam-bee/antispam_bee.php on line 1455

    How can this be fixed?

    Thank you,
    Rich

    http://wordpress.org/plugins/antispam-bee/

  2. awhig
    Member
    Posted 1 year ago #

    FYI,

    I'm using PHP 5.3.27.

    Rich

  3. Simon
    Member
    Posted 1 year ago #

    Did you modify any of the regex patterns on line 1399 of antispam_bee.php? Then '$regexp' could have an invalid value.
    Or it could be that a spam bot put invalid stuff into the comment field and then '$comment[$field]' contains garbage.

    I don't see how that could enter "invalid UTF-8 strings" however..

  4. awhig
    Member
    Posted 1 year ago #

    I have not modified any patterns.

    I believe it is spam bots posting garbage comments.

    I've done research and it looks like the solution is to remove or replace invalid UTF-8 characters in the data before processing.

    I'm not sure if you see this as a WP responsibility or antispam-bee's.

    Here is a discussion that has tons of links in regards to this.

    http://stackoverflow.com/questions/1401317/remove-non-utf8-characters-from-string

    All I know is my error log is full of these, as my sites gets thousands of spam messages a day.

    Thanks,
    Rich

  5. awhig
    Member
    Posted 1 year ago #

    Hi,

    Was this fixed in the latest release? I saw a comment in the change log that seemed related?

    If it was fixed, thanks for the update. Much appreciated.

    Rich

  6. awhig
    Member
    Posted 1 year ago #

    I think this was added in the new version:

    /* Ignore non utf-8 chars */
    $comment[$field] = ( function_exists('iconv') ? iconv('utf-8', 'utf-8//TRANSLIT', $comment[$field]) : $comment[$field] );

    Thanks,
    Rich

  7. awhig
    Member
    Posted 1 year ago #

    FYI,

    I'm still seeing the warning in my error_log with the latest version, but much, much, much less than before.

    [16-Dec-2013 17:59:24 UTC] PHP Warning: preg_match() [function.preg-match]: Compilation failed: invalid UTF-8 string at offset 1 in ..../wp-content/plugins/antispam-bee/antispam_bee.php on line 1466

    Thanks,
    Rich

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Antispam Bee
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.