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

---

# PHP Warning: Illegal string offset

 *  Resolved [largado](https://wordpress.org/support/users/largado/)
 * (@largado)
 * [12 years ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset/)
 * I installed a wordpress theme and I got this warning:
 * **_Warning: Illegal string offset ‘name’ in C:\XAMPP\htdocs\wp2\wp-content\themes\
   lexiity\inc\theme-settings.php on line 12_**
 * This is line 12:
 * `if(@$r3['value'] != '' && strlen($r3['name']) != 1 && $r3['type'] != 'select'&&
   $r3['type'] != 'radio' && $r3['type'] != 'checkbox'){`
 * This is the entire function:
 * `function populate_theme_options(){ GLOBAL $tabs,$wp_version; $pages = @get_all_pages();
   foreach ($tabs as $r1) { foreach ($r1 as $r2) { if (count($r2) > 0) { foreach((
   array)$r2 as $r3) { if(@$r3['value'] != '' && strlen($r3['name']) != 1 && $r3['
   type'] != 'select' && $r3['type'] != 'radio' && $r3['type'] != 'checkbox'){ if(
   version_compare( $wp_version, '3.4', '>=' ) ) {update_option(wp_get_theme().'_'.
   $r1['id'].'_'.$r3['name'], $r3['value']);}else{update_option(get_current_theme().'_'.
   $r1['id'].'_'.$r3['name'], $r3['value']);} } } } } } }`
 * Here is all the code in this php file:
 * [http://pastebin.com/6KdYVtXF](http://pastebin.com/6KdYVtXF)
 * How to remove this warning?

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

## Tags

 * [illegal](https://wordpress.org/support/topic-tag/illegal/)
 * [offset](https://wordpress.org/support/topic-tag/offset/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [string](https://wordpress.org/support/topic-tag/string/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [largado](https://wordpress.org/support/users/largado/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/php-warning-illegal-string-offset/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
