Title: [Plugin: Subscribe to Comments] Minor fixes
Last modified: August 20, 2016

---

# [Plugin: Subscribe to Comments] Minor fixes

 *  [firebird75](https://wordpress.org/support/users/firebird75/)
 * (@firebird75)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/)
 * 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/](http://wordpress.org/extend/plugins/subscribe-to-comments/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660548)
 * 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.
 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660549)
 * 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.
 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660550)
 * 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.
 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660551)
 * 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.
 *  [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660552)
 * 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.
 *  [learning22](https://wordpress.org/support/users/learning22/)
 * (@learning22)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660556)
 * 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.
 *  [learning22](https://wordpress.org/support/users/learning22/)
 * (@learning22)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660557)
 * 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…

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: Subscribe to Comments] Minor fixes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/subscribe-to-comments.svg)
 * [Subscribe to Comments](https://wordpress.org/plugins/subscribe-to-comments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscribe-to-comments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscribe-to-comments/)
 * [Active Topics](https://wordpress.org/support/plugin/subscribe-to-comments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscribe-to-comments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscribe-to-comments/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [learning22](https://wordpress.org/support/users/learning22/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-subscribe-to-comments-minor-fixes/#post-2660557)
 * Status: not resolved