WordPress.org

Support

Support » Plugins and Hacks » [Small bugs fixes] Undefined variables and such

[Small bugs fixes] Undefined variables and such

  • jrf
    Participant

    @jrf

    Hiya,

    Thanks for this nice plugin.

    I encountered some error notices in the PHP logs. I hope you’ll accept these fixes into the next version. Line numbers based on version 1.5.

    File: cets_conditional_widgets.php

    Find line 111:

    <ul class=conditional-widgets-special-page-option-list'>

    Replace with:

    <ul class="conditional-widgets-special-page-option-list">

    Find line 164:

    $instance['cw_select_home_page'] = $_POST['cw_select_home_page'];

    Replace with:

    $instance['cw_select_home_page'] = isset( $_POST['cw_select_home_page'] ) ? $_POST['cw_select_home_page'] : 1;

    Find line 168-170:

    $instance['cw_select_cats'] = $_POST['cw_select_cats'];
    	$instance['cw_cats_sub_checkbox'] = isset($_POST['cw_cats_sub_checkbox']) ? 1:0;
    	$instance['cw_selected_cats'] = $_POST['cw_selected_cats'];

    Replace with:

    $instance['cw_select_cats'] = isset($_POST['cw_select_cats']) ? $_POST['cw_select_cats']:1;
    	$instance['cw_cats_sub_checkbox'] = isset($_POST['cw_cats_sub_checkbox']) ? 1:0;
    	$instance['cw_selected_cats'] = isset($_POST['cw_selected_cats']) ? $_POST['cw_selected_cats'] : array();

    Find line 174-176:

    $instance['cw_select_pages'] = $_POST['cw_select_pages'];
    	$instance['cw_pages_sub_checkbox'] = isset($_POST['cw_pages_sub_checkbox']) ? 1:0;
    	$instance['cw_selected_pages'] = $_POST['cw_selected_pages'];

    Replace with:

    $instance['cw_select_pages'] = isset($_POST['cw_select_pages']) ? $_POST['cw_select_pages'] : 1;
    	$instance['cw_pages_sub_checkbox'] = isset($_POST['cw_pages_sub_checkbox']) ? 1:0;
    	$instance['cw_selected_pages'] = isset($_POST['cw_selected_pages']) ? $_POST['cw_selected_pages'] : array();

    Hope this helps & keep up the good work 😉

    Smile,
    Juliette

    http://wordpress.org/plugins/conditional-widgets/

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Small bugs fixes] Undefined variables and such’ is closed to new replies.