I’ve tested Akismet with PHP 7 and haven’t run into this issue. What other plugins are you running? I think I see how this could theoretically happen, but I’d like to be able to reproduce it before committing a fix.
Here are all the plugins that I am using → https://goo.gl/kPDPIF
-
This reply was modified 9 years, 3 months ago by
Milos Spasic.
After updating plugin to v3.3, server error log is still getting filled with these PHP Warnings:
[27-Feb-2017 09:41:36 UTC] PHP Warning: Illegal string offset 'comment_author_email' in /home/user/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
[27-Feb-2017 09:41:36 UTC] PHP Warning: Cannot assign an empty string to a string offset in /home/user/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
Is there any solution for this?
I really appreciate any help you can provide.
I’m sorry, I missed your previous response with the list of plugins. I’ll have to install them and see which (if any) are interfering and causing the behavior you’re seeing.
Alternatively, if you’re able to disable any of them and see if Akismet continues to generate those errors, it would be very helpful to have as many eliminated as possible before I start testing.
Not sure if you prefer I open a new topic but I am seeing similar error when using https://ww.wp.xz.cn/plugins/woocommerce-pos/
Hi,
I’m getting the same issue running Akismet and PHP 7.1.2:
[13-Mar-2017 21:23:46 UTC] PHP Warning: Illegal string offset 'comment_author_email' in /home/****/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
[13-Mar-2017 21:23:46 UTC] PHP Warning: Cannot assign an empty string to a string offset in /home/****/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
[13-Mar-2017 21:23:47 UTC] PHP Warning: Illegal string offset 'comment_author_email' in /home/****/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
[13-Mar-2017 21:23:47 UTC] PHP Warning: Cannot assign an empty string to a string offset in /home/****/public_html/wp-content/plugins/akismet/class.akismet.php on line 270
Wondering why this is marked as “resolved” ?
@woodsandhillsplc – Topic was marked as “resolved” by mistake, changed the status to the actual condition “not resolved”.
@cfinke – I cannot disable plugins, because that issue has occurred on a live eCommerce site, and I don’t have such an environment on local for testing purposes.
-
This reply was modified 9 years, 2 months ago by
Milos Spasic.
@woodsandhillsplc Which plugins are you running? If there’s overlap between your list and Milos’s, that could be a good clue towards fixing this.
@b2marketing I installed WooCommerce and WooCommerce POS and wasn’t able to reproduce the error.
@cfinke Hi thanks for your help, here is the list of plugins
Overlap I can see is:
Akismet
Contact form 7
Heartbeat control
Woocommerce
Is this still not resolved? I have just experienced the following on my site:

WooCommerce 3.0.3
Avada theme 5.1.6
Wordpress 4.7.3–en_GB
All plugins up to date
A user visited my site and selected a piece of furniture, popped it into the cart, went through the checkout process and was taken to PayPal. At that point they decided to cancel and return back to my web site and were hit by the above message.
For me its kind of urgent lol
Can anyone tell me what I need to do other than disable Askimet? I would prefer not to have to do that,
Thanks,
Sam
@goldandgreyuk You can set
define( 'WP_DEBUG_DISPLAY', false );
in your wp-config.php to hide any PHP notices on the frontend. This is a good practice for any production site.
I’ve made a change to try and avoid this; if you’d like to try it out before the next official release, you can manually install the development version from here: https://downloads.wp.xz.cn/plugin/akismet.zip
If you try it, let me know how it works for you.