Page 1 of 1

Object of class UserInbox could not be converted to string

Posted: Thu Apr 03, 2008 7:15 pm
by javasac
I KEEP GETTING THIS ERROR when adding a record. Please advice.

Catchable fatal error: Object of class UserInbox could not be converted to string in C:\wamp\ZendFramework-1.0.4\library\Zend\Db\Statement\Pdo.php on line 221

<?php
require_once('Zend/Date.php');

// this class fetches the private messages from the t_inbox table
class UserInbox extends Zend_Db_Table
{
protected $_name = 't_inbox';

public function postPrivateMessage($senderId, $receiverId, $zoneId, $sub, $msg, $msgType)
{
$logger = Zend_Registry::get(YoConstants::REGKEY_LOGGER);

$logger->debug('SUBJECT IS ' . $sub);
$date = Zend_Date::now();

$data = array(
'sender_id' => $senderId,
'receiver_id' => $receiverId,
'zone_id' => $zoneId,
'msgDate' => $date->toString(),
'message_type' => $msgType,
'message_text' => $msg,
'subject' => $sub,
'msg_read' => 'no',
'status' => '0'
);

$table = new UserInbox();
$table->insert($data);
}

}
?>

Re: Object of class UserInbox could not be converted to string

Posted: Thu Apr 03, 2008 7:40 pm
by John Cartwright
Posting identical threads in 4 different forums is not cool man. Consider this a warning.

Re: Object of class UserInbox could not be converted to string

Posted: Thu Apr 03, 2008 7:45 pm
by javasac
just wanted an answer ASAP.....sorry for that.

Re: Object of class UserInbox could not be converted to string

Posted: Thu Apr 03, 2008 8:38 pm
by javasac
can you please let me know which is the best forum to get an answer to this question?

Re: Object of class UserInbox could not be converted to string

Posted: Thu Apr 03, 2008 9:34 pm
by John Cartwright
Our forum rules only allow you to bump after 24 hours of your last post.

Please read our forum rules, viewtopic.php?f=6&t=30037, before posting again.

Consider this a second warning.

EDIT | Like I said I removed all the topics and left this one (before it was in the correct forum)