WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe to Comments
Minor fixes (8 posts)

  1. firebird75
    Member
    Posted 2 years ago #

    Hi,

    There are few minor coding issues that you might want to address :
    1/ Line 266 :
    $this->default_subscribed = ($this->settings['default_subscribed']) ? true : false;
    replace with :
    $this->default_subscribed = (isset($this->settings['default_subscribed'])) ? true : false;
    2/ Line 731 :
    if ( $update )
    replace with :
    if (isset($update))
    3/ Line 849 :
    add_action('init', create_function('$a','global $sg_subscribe; if ($_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {
    Replace with :
    add_action('init', create_function('$a','global $sg_subscribe; if (isset($_POST[\'solo-comment-subscribe\']) && $_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {

    This will allow to fix 3 php warnings :)

    Thanks!

    http://wordpress.org/extend/plugins/subscribe-to-comments/

  2. dartiss
    Member
    Posted 1 year ago #

    Also...

    Argument in add_management_page()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 801.
    Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.
    Deprecated in version 2.0.

  3. dartiss
    Member
    Posted 1 year ago #

    And another 2...

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 261
    Use get_option() instead.
    Deprecated in version 2.1.

    Argument in add_options_page()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 803.
    Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.
    Deprecated in version 2.0.

  4. dartiss
    Member
    Posted 1 year ago #

    Apologies, scrolled down and found a load more...

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 440.
    Use get_option() instead.
    Deprecated in version 2.1.

    Function: attribute_escape()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 292.
    Use esc_attr() instead.
    Deprecated in version 2.8.

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 951.
    Use get_option() instead.
    Deprecated in version 2.1.

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 954.
    Use get_option() instead.
    Deprecated in version 2.1.

    Function: attribute_escape()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 781.
    Use esc_attr() instead.
    Deprecated in version 2.8.

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 652.
    Use get_option() instead.
    Deprecated in version 2.1.

    Function: get_settings()
    Used in wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 604.
    Use get_option() instead.
    Deprecated in version 2.1.

    Function: get_settings()
    Used in wp-content/plugins/comment-approved-notifier/comment-approved-notifier.php on line 19.
    Use get_option() instead.
    Deprecated in version 2.1.

    I think that's them all now ;)

    David.

  5. dartiss
    Member
    Posted 1 year ago #

    Deprecated functions over, I'm also getting the following WP Debug error...

    NOTICE: wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php(852) : runtime-created function:1 - Undefined index: solo-comment-subscribe

    David.

  6. dartiss
    Member
    Posted 1 year ago #

    Two more, these time found in Admin (when adding a new post)...

    NOTICE: wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php:731 - Undefined variable: update
    NOTICE: wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php:266 - Undefined index: default_subscribed

    David.

  7. learning22
    Member
    Posted 1 year ago #

    I just installed and received this error message:

    ( ! ) Warning: Illegal string offset 'manager' in C:\wamp\www\1-W-D-C\wp-content\plugins\subscribe-to-comments\subscribe-to-comments.php on line 304
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0132	161608	{main}( )	..\tools.php:0
    2	0.0152	204520	require_once( 'C:\wamp\www\1-W-D-C\wp-admin\admin.php' )	..\tools.php:10
    3	1.7171	24915432	do_action( )	..\admin.php:151
    4	1.7171	24916320	call_user_func_array ( )	..\plugin.php:403
    5	1.7171	24916336	sg_subscribe_admin( )	..\plugin.php:403
    6	1.7178	24918344	sg_subscribe->show_errors( )	..\subscribe-to-comments.php:969

    I opened the file subscribe-to-comments.php and on line 304 I have:

    if ( is_array($this->errors[$type]) ) {

    which is within this section:

    function show_errors($type='manager', $before_all='<div class="updated updated-error">', $after_all='</div>', $before_each='<p>', $after_each='</p>'){
    		if ( is_array($this->errors[$type]) ) {
    			echo $before_all;
    			foreach ($this->errors[$type] as $error)
    				echo $before_each . $error . $after_each;
    			echo $after_all;
    		}
    		unset($this->errors);
    	}

    I'm learning php the long way, learning along the way...any assistance is appreciated.

    Looks like a good plugin, hope I can use it.
    thanks for the help.

  8. learning22
    Member
    Posted 1 year ago #

    I solved the problem. I'm just learning the WordPress Network. I disabled the plugin on the main blog on network and its working fine on the sub-site.

    Hope this helps others...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic