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);
}
}
?>
Object of class UserInbox could not be converted to string
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Object of class UserInbox could not be converted to string
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
just wanted an answer ASAP.....sorry for that.
Re: Object of class UserInbox could not be converted to string
can you please let me know which is the best forum to get an answer to this question?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Object of class UserInbox could not be converted to string
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)
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)