Title: Fatal error: Cannot use string offset as an array
Last modified: August 20, 2016

---

# Fatal error: Cannot use string offset as an array

 *  [nikkione](https://wordpress.org/support/users/nikkione/)
 * (@nikkione)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-3/)
 * At first i have the issue:
 * > Warning: Invalid argument supplied for foreach() in /path/wp-content/plugins/
   > types/embedded/admin.php on line 423
   >  Warning: Invalid argument supplied for
   > foreach() in /path/to/wp-content/plugins/types/embedded/includes/fields.php
   > on line 76 Warning: Invalid argument supplied for foreach() in /path/to/wp-
   > content/plugins/types/embedded/classes/conditional.php on line 82
 * [I fixed it](http://wordpress.org/support/topic/patch-invalid-argument-in-fieldsphp?replies=5),
   but when i tru to create a custom field i see this:
 * >  Warning: array_key_exists() expects parameter 2 to be array, string given 
   > in /path/wp-content/plugins/types/embedded/types.php on line 183 Warning: array_key_exists()
   > expects parameter 2 to be array, string given in /path/wp-content/plugins/types/
   > embedded/types.php on line 183 Warning: array_key_exists() expects parameter
   > 2 to be array, string given in /path/wp-content/plugins/types/embedded/types.
   > php on line 192 Fatal error: Cannot use string offset as an array in /path/
   > wp-content/plugins/types/embedded/admin.php on line 447
 * Please help me.
    (wp 3.5.1 types 1.2 php5.4)
 * [http://wordpress.org/extend/plugins/types/](http://wordpress.org/extend/plugins/types/)

Viewing 1 replies (of 1 total)

 *  [jozik](https://wordpress.org/support/users/jozik/)
 * (@jozik)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-3/#post-3560933)
 * Hi nikklone, we included fix for this.
    is_array( $fields ) is needed in few 
   places.

Viewing 1 replies (of 1 total)

The topic ‘Fatal error: Cannot use string offset as an array’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/types_ced1d3.svg)
 * [Toolset Types - Custom Post Types, Custom Fields and Taxonomies](https://wordpress.org/plugins/types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/types/)
 * [Active Topics](https://wordpress.org/support/plugin/types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/types/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 1 reply
 * 2 participants
 * Last reply from: [jozik](https://wordpress.org/support/users/jozik/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-3/#post-3560933)
 * Status: not resolved