Closed (fixed)
Project:
Guestbook
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
21 Sep 2006 at 15:39 UTC
Updated:
15 Mar 2007 at 18:45 UTC
Guestbook page throws following error when viewed by anonymous:
PHP Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /var/www/apps/drupal-4.7.3/includes/common.inc on line 1100,
Comments
Comment #1
sushiGer commentedI have exactly the same error!
Has someone has a soultion to this bug?
Comment #2
sushiGer commentedI'm sorry not exactly the same error:
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /var/.../includes/common.inc on line 1105
Comment #3
Andreas Wolf commentedSame error here (common.inc line1105).
I just installed the guestbook module and was testing it.
I had two anonymous post. Everything was fine. The error occured after a registered user posted to the guestbook and I tried to read it as anonymous user.
As registered user I can read the guestbook without error, but I can't login on the guestbook page. If I try to do so the url changes to http://myurl/en/guestbook?destination=en%2Fguestbook and the error occures. If I login on another page and click on the guestbook link everything is fine.
I logged out and tried to view the guestbook again as anonymous user. Now I don't get the error, but I only see anonymous posts, the guestbook entry from the registered user is not visible.
Very strange.
Comment #4
Andreas Wolf commentedfollow up to my last post:
I posted again as anonymous user, now I saw the two anonymous posts and the registered users post, but not my last anonymous post. After clicking on the guestbook link the registered post was gone again, but now I could see the three anonymous posts.
Then again there was only a blank guestbook page with the above error.
I deleted the registered users guestbook entry and now the error was gone.
I think this bug report is a duplicate of http://drupal.org/node/65013 (Seems to have a conflict with user avatar) or is related.
Comment #5
Jonas Kvarnstrom commentedThe bug is in theme_guestbook_entry. The line
$output = l($account->name ? $account->name : variable_get('anonymous', 'Anonymous'), $user_link, $user_text);should be:
$output = l($account->name ? $account->name : variable_get('anonymous', 'Anonymous'), $user_link, array("title" => $user_text));Comment #6
simpsons@p7.dk commentedI can confirm the fix posted by #5 (Jonas) but the fix isnt in function
theme_guestbook_entrybut intheme_guestbook_user_picture($uid)I have just installed the latest guestbook module (dated nov. 13 2006) in a drupal 4.7.4 and changed the line pointed by #5 and now I can post in guestbook both as user and anonymous (before the fix I got the error when trying to access the guestbook as anonymous)
Comment #7
hba commentedI just patched theme_guestbook_user_picture() in 5.x and 4.7.x. Thanks for the help.
Comment #8
(not verified) commented