• Resolved largado

    (@largado)


    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

    How to remove this warning?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    There does not appear to be a theme named “lexiity” in the WordPress.org themes directory.

    If this is a commercial theme, you really need to go ask for help from the theme’s author or vendor directly. They are best equipped to fix the problems with the theme’s code.

    Thread Starter largado

    (@largado)

    Hello. I’ve tried, they do not respond. This is a free theme.

    stephencottontail

    (@stephencottontail)

    But it doesn’t come from the official WP.org repository. Here, we only support themes that were downloaded from the official WP.org repository.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    That said, if you’re getting warning messages on your live site, then you need to turn off the PHP display_errors setting. Production sites should never have debugging mode enabled.

    Thread Starter largado

    (@largado)

    Ok. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning: Illegal string offset’ is closed to new replies.