Hello,

thank you for this module !
I have a notice "Trying to get property of non-object in comment_notify_get_user_node_notify_preference()"

This is actuel code:

<?php
function comment_notify_get_user_node_notify_preference($uid) {
 
$setting = comment_notify_get_user_notification_setting($uid);
  if (!
$setting) {
   
$settings = comment_notify_get_default_notification_setting();
  }
  return
$setting->node_notify;
}
?>

After fix, I just rename the variable (settings->setting) :

<?php
function comment_notify_get_user_node_notify_preference($uid) {
 
$setting = comment_notify_get_user_notification_setting($uid);
  if (!
$setting) {
   
$setting = comment_notify_get_default_notification_setting();
  }
  return
$setting->node_notify;
}
?>

I do a patch for this right now.

Files: 
CommentFileSizeAuthor
#1 wrong_variable_name-1774894-1.patch545 bytespoukram
PASSED: [[SimpleTest]]: [MySQL] 46 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new545 bytes
PASSED: [[SimpleTest]]: [MySQL] 46 pass(es).
[ View ]

This is the patch

When and how did you experience the error?

I am using 7 and I have experienced no errors, I can see the difference in code. However I do not see any errors.

Could you specify when and how the error occurred, which circumstances?

Status:Needs review» Fixed

Makes sense, @poukram. Thanks for the issue and patch - now committed http://drupalcode.org/project/comment_notify.git/commit/71fa5a5

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.