Skip to content

Undefined index notices when in WP_DEBUG for woocommerce integrations #114

@vinnyusestrict

Description

@vinnyusestrict

I had to turn on WP_DEBUG for a moment and got several undefined index notices for includes/integrations/woocommerce/functions.php.

Basically you're trying to fetch data from $options when they don't exist. Ideally you'd check for isset() first.

function highwind_woocommerce_layout_classes( $classes ) {
    $options            = get_option( 'highwind_woocommerce_options' );
    $archive_fullwidth  = isset( $options['archive_fullwidth'] ) ? $options['archive_fullwidth'] : null;
    $details_fullwidth  = isset( $options['details_fullwidth'] ) ? $options['details_fullwidth'] : null;

Cheers,
Vinny

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions