Title: PHP Warning:  Illegal string offset
Last modified: August 22, 2016

---

# PHP Warning: Illegal string offset

 *  Resolved [drakcore](https://wordpress.org/support/users/drakcore/)
 * (@drakcore)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/)
 * Getting this spammed constantly in the error logs.
    Errors on size, style and
   colour.
 * [18-Oct-2014 08:21:40 Africa/Harare] PHP Warning: Illegal string offset ‘size’
   in /home4/drakcore/public_html/DB/wp-content/plugins/wysija-newsletters/helpers/
   render_engine.php on line 109
    [18-Oct-2014 08:21:40 Africa/Harare] PHP Warning:
   Illegal string offset ‘style’ in /home4/drakcore/public_html/DB/wp-content/plugins/
   wysija-newsletters/helpers/render_engine.php on line 109 [18-Oct-2014 08:21:40
   Africa/Harare] PHP Warning: Illegal string offset ‘color’ in /home4/drakcore/
   public_html/DB/wp-content/plugins/wysija-newsletters/helpers/render_engine.php
   on line 109
 * ——-
    Looked at the file and this is the code at line 109 in that file.
 * `if (isset($vars['border'])) $result[] = 'border: ' . $vars['border']['size'].''.
   $vars['border']['style'] . ' ' . $vars['border']['color'] . ';';`
 * [https://wordpress.org/plugins/wysija-newsletters/](https://wordpress.org/plugins/wysija-newsletters/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Marcelo Pedra](https://wordpress.org/support/users/kent-brockman/)
 * (@kent-brockman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400674)
 * Hi! I’m seeing the same PHP errors. Hope to see it fixed soon.
 *  [ambrooo](https://wordpress.org/support/users/ambrooo/)
 * (@ambrooo)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400682)
 * Same problem here. Though, the plugin still works until the moment of sending
   emails.
 *  [chmars](https://wordpress.org/support/users/chmars/)
 * (@chmars)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400753)
 * Same problem here:
 * `[…] PHP Warning: Illegal string offset 'size' in /home/…/wp-content/plugins/
   wysija-newsletters/helpers/render_engine.php on line 109`
 *  [stevem](https://wordpress.org/support/users/stevem/)
 * (@stevem)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400757)
 * Mailpoet support have solved this problem with a change to line 109 in render_engine.
   php. They say the error only occurs in PHP 5.4 and that the next update will 
   correct it.
 * You can manually change it before then. This is their solution.
    Change line 
   109 render_engine.php
 * from
 * `if (isset($vars['border'])) $result[] = 'border: ' . $vars['border']['size'].''.
   $vars['border']['style'] . ' ' . $vars['border']['color'] . ';';`
 * to
 * `if (isset($vars['border']) && is_array($vars['border'])) $result[] = 'border:'.
   $vars['border']['size'] . ' ' . $vars['border']['style'] . ' ' . $vars['border']['
   color'] . ';';`
 *  [Wysija](https://wordpress.org/support/users/wysija/)
 * (@wysija)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400759)
 * It seems to be an issue with PHP 5.4. and we’re working to patch it very soon
   with the next release.
 * Could you please get in touch with us here, we’ll need to ask you additional 
   information to check this issue: [http://support.mailpoet.com/feedback/](http://support.mailpoet.com/feedback/)
   and let us know the URL of this topic.
 *  [Wysija](https://wordpress.org/support/users/wysija/)
 * (@wysija)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400760)
 * We have solved this problem with a change to line 109 in render_engine.php. The
   error only occurs in PHP 5.4 and the next update will correct it.
 * You can manually change it before then. This is their solution.
    Change line 
   109 render_engine.php
 * from
 * `if (isset($vars['border'])) $result[] = 'border: ' . $vars['border']['size'].''.
   $vars['border']['style'] . ' ' . $vars['border']['color'] . ';';`
 * to
 * `if (isset($vars['border']) && is_array($vars['border'])) $result[] = 'border:'.
   $vars['border']['size'] . ' ' . $vars['border']['style'] . ' ' . $vars['border']['
   color'] . ';';`
 * Let us know if it works!
 *  Thread Starter [drakcore](https://wordpress.org/support/users/drakcore/)
 * (@drakcore)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400761)
 * Thanks a lot guys.
 *  [Wysija](https://wordpress.org/support/users/wysija/)
 * (@wysija)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400787)
 * 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘PHP Warning: Illegal string offset’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wysija-newsletters_ffddcc.svg)
 * [MailPoet Newsletters (Previous)](https://wordpress.org/plugins/wysija-newsletters/)
 * [Support Threads](https://wordpress.org/support/plugin/wysija-newsletters/)
 * [Active Topics](https://wordpress.org/support/plugin/wysija-newsletters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wysija-newsletters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wysija-newsletters/reviews/)

 * 8 replies
 * 6 participants
 * Last reply from: [Wysija](https://wordpress.org/support/users/wysija/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset-2/#post-5400787)
 * Status: resolved