Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After entering an email id and a message, then clicking on Invite button the below warning comes up along with the Fatal Error.
"Error
The website encountered an unexpected error. Please try again later.
Warning: unserialize() expects parameter 1 to be string, array given in invite_get_remaining_invites() (line 703 of /var/www/sites/all/modules/invite/invite.module).
Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 2039 of /var/www/includes/database/database.inc)."
Comment | File | Size | Author |
---|---|---|---|
#7 | invite-1054392.patch | 495 bytes | hadsie |
Comments
Comment #1
hadsie CreditAttribution: hadsie commentedComment #2
bnoice CreditAttribution: bnoice commentedSubscribe (from the dupe issue)
Comment #3
jacov CreditAttribution: jacov commentedsubscribing
Comment #4
jacov CreditAttribution: jacov commentedThe fix I believe is basically removing the unserialize function on line 698 of modules/invite/invite.module
Details, below...
Problem is here:
Fix is here:
Comment #5
sw3b CreditAttribution: sw3b commentedNice work thanks !
Comment #6
danielm CreditAttribution: danielm commentedHello,
I put patch #4, When I go to the URL "http://www.yourdomain.com/invite" to invite a new friend, the following error message appeared:
Warning: unserialize() expects parameter 1 to be string, array given in invite_get_remaining_invites() (line 699 of /var/www/public/sites/all/modules/invite/invite.module).
This only appears when logged in as a normal registered user and not as the administrator (i.e. UID = 1).
Thank you for your help
Sincerely
Daniel
Comment #7
hadsie CreditAttribution: hadsie commentedHere's the fix rolled into a patch. Note that this patch is generated from a codebase that has already had the patches from #1124708: To the maintainers -- Can we get some D7 patches applied to code? applied.
Comment #8
glekli CreditAttribution: glekli commentedCommitted. Also updated is the method the data is saved into the user object.
Thanks for the fix.