WordPress.org

Ready to get started?Download WordPress

Forums

How to fix this: Warning: Illegal string offset 'name' ? (2 posts)

  1. Mezloh
    Member
    Posted 1 year ago #

    I am getting the following warning when activating my theme.

    Warning: Illegal string offset 'name' in C:\xampp\htdocs\wahkon\wp-content\themes\invisi\inc\theme-settings.php on line 12

    here is the code from the theme-settings.php

    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']);}
                        }
                    }
                }
            }
        }
    }

    although the theme is still activated I am unable to load images to any posts or pages because the image uploader goes blank, or If I get past that point as the image uploads to the post or as the "featured image" I get the white screen of death.

    Another problem is some of the buttons in admin wont work, such as creating a category, the nothing happens however, if I refresh the page the category is created.

    Any help would be greatly appreciated.

  2. anujoshi
    Member
    Posted 10 months ago #

    r u able to solve this issue?
    I am getting same error... :(

Topic Closed

This topic has been closed to new replies.

About this Topic