Title: Illegal string offset warning
Last modified: April 24, 2017

---

# Illegal string offset warning

 *  Resolved [cullylarson](https://wordpress.org/support/users/cullylarson/)
 * (@cullylarson)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-warning-5/)
 * I’m getting a few `Illegal string offset` warnings when I open the “GatherContent”
   page in WordPress. Nothing else is displayed, so I can’t actually do anything
   with the plugin. I’m getting this error immediately after activating the plugin
   and clicking on “GatherContent” in the admin menu. I haven’t configured the plugin
   at all. If I disable warnings or patch the plugin (as explained below), the page
   loads as it should. These are the full text of the warnings:
 *     ```
       Warning: Illegal string offset 'fed5f7cb3f57119fe54948b89fd7d345' in /var/www/html/wp-content/plugins/gathercontent-import/includes/classes/views/view.php on line 68
   
       Warning: Illegal string offset 'fed5f7cb3f57119fe54948b89fd7d345' in /var/www/html/wp-content/plugins/gathercontent-import/includes/classes/views/view.php on line 75
       <
       Warning: Illegal string offset 'fed5f7cb3f57119fe54948b89fd7d345' in /var/www/html/wp-content/plugins/gathercontent-import/includes/classes/views/view.php on line 78
       ```
   
 * The problem is that the `View::views` variable is not being initialized correctly
   on line 28. It’s being initialized as a string, not as an array. So when it is
   later accessed as an array, PHP throws a warning. Making this change to line 
   28 fixes the problem:
 * `protected static $views = [];`
 * I’d rather not turn off warnings to fix this, since I’m working in a development
   environment. So I’ll probably just patch the plugin and hope it gets fixed in
   the next update. Thanks!

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

 *  [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-warning-5/#post-9063135)
 * Thank you for reporting. We have actually patched this in the development version(
   [https://github.com/zao-web/gathercontent-wordpress-plugin/commit/498770925576af08e3292ef3864fe8e56b053b9d](https://github.com/zao-web/gathercontent-wordpress-plugin/commit/498770925576af08e3292ef3864fe8e56b053b9d)),
   and will be fixed in the next release.
 *  [Justin Sternberg](https://wordpress.org/support/users/jtsternberg/)
 * (@jtsternberg)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-warning-5/#post-9063154)
 * I, in fact, just pushed that update, and it should be available shortly in your
   WP dashboard (3.0.9).
 *  Thread Starter [cullylarson](https://wordpress.org/support/users/cullylarson/)
 * (@cullylarson)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-warning-5/#post-9063631)
 * Works great. Thanks!

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

The topic ‘Illegal string offset warning’ is closed to new replies.

 * ![](https://ps.w.org/gathercontent-import/assets/icon-256x256.png?rev=1460860)
 * [GatherContent Plugin](https://wordpress.org/plugins/gathercontent-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gathercontent-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gathercontent-import/)
 * [Active Topics](https://wordpress.org/support/plugin/gathercontent-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gathercontent-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gathercontent-import/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [cullylarson](https://wordpress.org/support/users/cullylarson/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-warning-5/#post-9063631)
 * Status: resolved