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

sushiGer’s picture

I have exactly the same error!
Has someone has a soultion to this bug?

sushiGer’s picture

I'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

Andreas Wolf’s picture

Same 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.

Andreas Wolf’s picture

follow 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.

Jonas Kvarnstrom’s picture

The 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));

simpsons@p7.dk’s picture

I can confirm the fix posted by #5 (Jonas) but the fix isnt in function theme_guestbook_entry but in
theme_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)

hba’s picture

Assigned: Unassigned » hba
Status: Active » Fixed

I just patched theme_guestbook_user_picture() in 5.x and 4.7.x. Thanks for the help.

Anonymous’s picture

Status: Fixed » Closed (fixed)