Object of class UserInbox could not be converted to string

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:wampZendFramework-1.0.4libraryZendDbStatementPdo.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); } } ?>

You’re using a third-party script -> go complain at the third party :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service