WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Few small bugs fixes] Undefined variables and such

[Resolved] [Few small bugs fixes] Undefined variables and such

  • Hiya Joe,

    When doing a version compare I noticed I made a number of small changes to the plugin code – bug fixes. I hope you’ll include them in the next release. Line numbers are based on the current version 1.3.2.

    Smile, Juliette

    File: mcm-widgets.php

    Find line 26-27:

    $post_type = esc_attr($instance['mcm_widget_post_type']);
    $title = esc_attr($instance['title']);

    Replace with:

    $post_type = isset( $instance['mcm_widget_post_type'] ) ? esc_attr($instance['mcm_widget_post_type']) : '';
    $title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '';

    Find line 34:

    <label for="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>"><?php _e('Post type to search','my-content-management'); ?></label> <select<?php echo $disabled; ?> id="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>" name="<?php echo $this->get_field_name('mcm_widget_post_type'); ?>">

    Replace with:

    <label for="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>"><?php _e('Post type to search','my-content-management'); ?></label> <select<?php echo $enabled; ?> id="<?php echo $this->get_field_id('mcm_widget_post_type'); ?>" name="<?php echo $this->get_field_name('mcm_widget_post_type'); ?>">

    File: my-content-management.php

    Find line 554:

    'menu_icon' => ($ns['menu_icon']=='')?null:$ns['menu_icon'],

    Replace with:

    'menu_icon' => ( !isset($ns['menu_icon']) || $ns['menu_icon']=='')?null:$ns['menu_icon'],

    Find line 570:

    'menu_icon' => $ns['menu_icon'],

    Replace with:

    'menu_icon' => ( !isset($ns['menu_icon']) || $ns['menu_icon']=='')?null:$ns['menu_icon'],

    File: my-glossary-filter.php

    Find line 85:

    $this_letter = strtolower( substr( get_the_title( $post->ID ), 0, 1 ) );

    Replace with:

    $this_letter = ( isset( $post->ID ) ? strtolower( substr( get_the_title( $post->ID ), 0, 1 ) ) : false );

    http://wordpress.org/extend/plugins/my-content-management/

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