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:
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) :
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | wrong_variable_name-1774894-1.patch | 545 bytes | poukram |
Comments
Comment #1
poukram commentedThis is the patch
Comment #2
OddJob commentedWhen 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?
Comment #3
gregglesMakes sense, @poukram. Thanks for the issue and patch - now committed http://drupalcode.org/project/comment_notify.git/commit/71fa5a5