- if ((isset($recipient->friend_notification) && $recipient->friend_notification !== -1) || !isset($recipient->friend_notification)) {
+ if ((isset($recipient->friend_notification) && $recipient->friend_notification != -1) || !isset($recipient->friend_notification)) {
We have to use "not equal" (!=) operator instead of "not identical" (!==) , because user settings stored in the database as strings, not numbers.
| Comment | File | Size | Author |
|---|---|---|---|
| flag_friend.module.patch | 761 bytes | quotesbro |
Comments
Comment #1
quotesbro commentedOtherwise we should enclose -1 with double quotes.
Comment #2
quotesbro commentedComment #3
miklLooks good, should be merged.
Comment #4
sirkitree commentedI opted for the quotes around -1 instead and kept the "not identical" (!==) as it's more accurate and keeps the reader in mind that this is stored as a string.
Commit: http://drupalcode.org/project/flag_friend.git/commitdiff/01a0f0c0c37efb9...
Thanks!
Comment #5
quotesbro commentedThank you. Could you commit it to 6.x-1.x-dev as well?
Comment #6
sirkitree commentedbackported.
http://drupalcode.org/project/flag_friend.git/commit/d8fae8a