error: Cannot use object of type phpbb\user as array ตอนส่งเมล

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: error: Cannot use object of type phpbb\user as array ตอนส่งเมล

Re: error: Cannot use object of type phpbb\user as array ตอนส่งเมล

โดย thatsawan » 10/03/2016 11:34 pm

กำหนดภาษาผิด
$this->user['user_lang']

Re: error: Cannot use object of type phpbb\user as array ตอนส่งเมล

โดย mindphp » 10/03/2016 11:25 pm

ลองเปลี่ยน $this->user['user_lang'] เป็น th หรือ en ดูก่อน นะครับว่ายัง Error ไหม

error: Cannot use object of type phpbb\user as array ตอนส่งเมล

โดย thatsawan » 10/03/2016 11:23 pm

atal error: Cannot use object of type phpbb\user as array in /home/jobthai/domains/jobthai.in.th/public_html/mtb/forum/ext/mindphp/m_photo_tracing/controller/buy_photo.php on line 122
$email_template = 'newtopic_notify';

//if ($this->config['email_enable']) {

include_once($this->root_path . 'includes/functions_messenger.' . $this->php_ext);

$messenger = new \messenger(FALSE);

$messenger->template($email_template, $this->user['user_lang']);
print_r($messenger); exit;
$messenger->to($email, $username);

$messenger->anti_abuse_headers($this->config, $this->user);

$messenger->assign_vars(array(
//'WELCOME_MSG' => htmlspecialchars_decode(sprintf($this->user->lang['WELCOME_SUBJECT'], $this->config['sitename'])),
'USERNAME' => htmlspecialchars_decode($user_row['username']),
'PASSWORD' => htmlspecialchars_decode($user_password),
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user_id}&k=$user_actkey"
));

ข้างบน