WordPress.org

Forums

Conditional Widgets
[Small bugs+fixes] Undefined variables and such (8 posts)

  1. jrf
    Member
    Posted 1 year ago #

    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/

  2. Kramarz
    Member
    Posted 1 year ago #

    Thanks jrf, going to implement those fixes on my work, till they will get included in next update! :-)

  3. Kramarz
    Member
    Posted 1 year ago #

    btw Juliette,

    would you be able to get a solution for my problem described on

    http://wordpress.org/support/topic/not-accessible-on-every-widget?replies=1

  4. Kramarz
    Member
    Posted 1 year ago #

    I see that in the latest update, besides the missing

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

    " mark, no other suggested changes were implemented, would you suggest to make them again Juliette?

  5. jrf
    Member
    Posted 1 year ago #

    Hi @Kramarz, yes, I would definitely suggest making them again.
    I will try and reach the author in a different way to see about getting my fixes into the plugin core.

  6. Kramarz
    Member
    Posted 1 year ago #

    Thankies :-)

  7. Jason Lemahieu (MadtownLems)
    Member
    Plugin Author

    Posted 1 year ago #

    The remaining updates here should find their way into a future update, but they really shouldn't cause any trouble for anyone in the meantime, even if WP_DEBUG is enabled.

  8. Kramarz
    Member
    Posted 1 year ago #

    Good to know :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Conditional Widgets
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.