PHP 7.1 Bug – Warning: Illegal string offset…class-social-popup.php
-
So after updating to php 7.1 I started getting these warnings
Warning: Illegal string offset ‘facebook’ in /var/www/fr/actifio/wp-content/plugins/popups/public/class-social-popup.php on line 465
Warning: Illegal string offset ‘twitter’ in /var/www/fr/actifio/wp-content/plugins/popups/public/class-social-popup.php on line 473
Warning: Illegal string offset ‘google’ in /var/www/fr/actifio/wp-content/plugins/popups/public/class-social-popup.php on line 481
dug around a bit and it looks like on line 451 spuvar_social is declared as a string and then a couple lines down we try to add elements to it as an array
$spuvar_social = '';
so I changed
$spuvar_social = ''; // to $spuvar_social = array();
and the warnings went away. hopefully a fix can be added to the next version.
Thanks!
- The topic ‘PHP 7.1 Bug – Warning: Illegal string offset…class-social-popup.php’ is closed to new replies.