Title: Error Shortcodes in PHP7
Last modified: August 31, 2016

---

# Error Shortcodes in PHP7

 *  [alfredo49](https://wordpress.org/support/users/alfredo49/)
 * (@alfredo49)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-shortcodes-in-php7/)
 * Hi:
 * In PHP7 when i use wp members shortcodes return this error (in php 5.6 dont happens)
 * Warning: Illegal string offset ‘field’ in /usr/home/xxx.com/web/xxx/wp-content/
   plugins/wp-members/inc/shortcodes.php on line 366 Warning: Illegal string offset‘
   field’ in /usr/home/xxx.com/web/xxx/wp-content/plugins/wp-members/inc/shortcodes.
   php on line 369 Warning: Illegal string offset ‘field’ in /usr/home/xxx.com/web/
   xxxx/wp-content/plugins/wp-members/inc/shortcodes.php on line 366 Warning: Illegal
   string offset ‘field’ in /usr/home/xxx.com/web/xxx/wp-content/plugins/wp-members/
   inc/shortcodes.php on line 369 Warning: Illegal string offset ‘field’ in /usr/
   home/xxx.com/web/xxx/wp-content/plugins/wp-members/inc/shortcodes.php on line
   366 Warning: Illegal string offset ‘field’ in /usr/home/xxx.com/web/xxx/wp-content/
   plugins/wp-members/inc/shortcodes.php on line 369
 * [https://wordpress.org/plugins/wp-members/](https://wordpress.org/plugins/wp-members/)

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

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-shortcodes-in-php7/#post-7366541)
 * Looks like an issue specifically with the field shortcode and I do see the problem.
   It will be fixed in the next release.
 * If you need an immediate fix, try the following. In file /inc/shortcodes.php 
   lines change instances of this:
 * `$user_info->$atts['field']`
 * to this:
 * `$user_info->{$atts['field']}`
 * There are three total instances – two in the first line and one in the second(
   actual line numbers depend on the version being used).
 *  Thread Starter [alfredo49](https://wordpress.org/support/users/alfredo49/)
 * (@alfredo49)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/error-shortcodes-in-php7/#post-7366609)
 * Thxs for supporting!
 * I will wait to the next release.
 * Regards

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

The topic ‘Error Shortcodes in PHP7’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [alfredo49](https://wordpress.org/support/users/alfredo49/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/error-shortcodes-in-php7/#post-7366609)
 * Status: not resolved