Closed (fixed)
Project:
Privatemsg
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Dec 2005 at 02:05 UTC
Updated:
23 Jun 2006 at 15:45 UTC
when you click on the send private message the error ""warning: Attempt to assign property of non-object in /var/www/html/modules/privatemsg/privatemsg.module on line 263." shows up on top of the send form. The To: textbox is empty and you have to type the username of the recipient or if you have previously sent a message then you can select a username on the contact dropdown. Everything else seems to work including sending messages and replying to messages.
Comments
Comment #1
gte451f commentedConfirmed sigthing on Lamp stack
Fedora Core 1
Apache 2.x
Mysql 4.x
PHP 5.0x
Comment #2
drummThere are a few links to this form. Which ones are broken?
Comment #3
jimmyharris commentedI'm getting this error when I click on the "Write to author" link at the bottom of a comment. The link that gives the error is http://localhost/privatemsg/msgto/1.
Using Drupal 4.7 beta 4, Privatemsg (4.7.0, 08/12/2005 - 00:27), Fedora core 4, Apache 2, MySQL 4.1, PHP5.
Comment #4
syawillim commentedAm getting same error, rolled back to PHP 4 and the error message is no longer generated but the "To" field is still not populated.
Comment #5
Patrick Nelson commentedConfirm - I'm getting this error too - and am on latest version of module with latest 4.7-CVS as of today
Comment #6
fool2 commentedI think that's the line in question. $msg is an array in this case... But it needs to be an object.
So before switch($op) above it you need to put $msg = (object)($msg);
Comment #7
syawillim commentedChanging:
$msg->recipient = db_result(db_query("SELECT name FROM {users} WHERE uid = '%d'", $arg));to:
resolves issue.
Comment #8
satori1984 commented+1
A patched privatemsg.module which addresses both this issue and the one stated at here can be found at http://drupal.org/node/60903
Comment #9
mindless commentedI have included this change in 67612.
Comment #10
mindless commentedComment #11
(not verified) commented