• In personalize mode, this news appears. The code is as follows. What should I change?

    p.s. The code in bold corresponds to the line to be corrected

    Thank you very much for your help

    Notice: Trying to access array offset on value of type null in?/Applications/MAMP/htdocs/romana-avellino/wp-content/themes/mesmerize-pro/inc/companion.php?on line?156 e 149

    public static function check_companion( $wp_customize ) {
    
    $plugin_state = self::$plugin_state;
    
    if ( ! $plugin_state['installed'] || ! $plugin_state['active'] ) {
    
    $wp_customize->add_setting( 'companion_install', array(
    
    'default' => '',
    
    'sanitize_callback' => 'esc_attr',
    
    ) );
    
    if ( ! $plugin_state['installed'] ) {
    
    $wp_customize->add_control(
    
    new Install_Companion_Control(
    
    $wp_customize,
    
    'mesmerize_page_content',
    
    array(
    
    'section' => 'page_content',
    
    'settings' => 'companion_install',
    
    'label' => self::$config['install_label'],
    
    'msg' => self::$config['install_msg'],
    
    'plugin_state' => $plugin_state,
    
    'slug' => self::$slug,
    
    )
    
    )
    
    );
    
    } else {
    
    $wp_customize->add_control(
    
    new Activate_Companion_Control(
    
    $wp_customize,
    
    'mesmerize_page_content',
    
    array(
    
    'section' => 'page_content',
    
    'settings' => 'companion_install',
    
    'label' => self::$config['activate_label'],
    
    'msg' => self::$config['activate_msg'],
    
    'plugin_state' => $plugin_state,
    
    'slug' => self::$slug,
    
    )
    
    )
    
    );
    
    }
    
    Companion_Plugin::show_companion_popup( $plugin_state );
    
    }
    
    }


Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Array Null’ is closed to new replies.