Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: Parse error: syntax error, unexpected '[', expecting ')' in
Форумы портала PHP.SU » » Если скрипт не работает » Parse error: syntax error, unexpected '[', expecting ')' in

Страниц (1): [1]
 

1. CRAZySTR - 25 Августа, 2014 - 14:27:45 - перейти к сообщению
Всем привет, нужна помощь в исправлении.
PHP:
скопировать код в буфер обмена
  1.         public function editsignature()
  2.         {
  3.                 $blogquery = $this->db->query("SELECT * FROM `posts` LIMIT 0, 5");
  4.                 $datestring = "%Y";
  5.                 $data = array(
  6.             'blog_title' => $this->config->item('site_title'),
  7.             'blog_heading' => $this->config->item('site_heading'),
  8.             'template_dir' => base_url().'templates/'.$this->config->item('template').'/ucp/',
  9.             'page_name' => 'Editing Signature',
  10.             'year' => mdate($datestring).' | Powered by FractalBB',
  11.             'userdata' => $this->user_model->getDetails(get_cookie('token')),
  12.             'username' => $this->user_model->userFromToken(get_cookie('token')), //Get username using v1.2 method
  13.             'signature' => $this->user_model->getDetails(get_cookie('token'))['signature'],//95 строка
  14.             'latest_posts' => $blogquery->result_array(),
  15.             'ucp_modules' => $this->modules->generateUCPLinks()
  16.             );
  17.  
  18.                 $this->parser->parse('../../templates/'.$this->config->item('template').'/ucp/header',$data); //Initiate the 'header' file with all the data above
  19.                 $this->parser->parse('../../templates/'.$this->config->item('template').'/ucp/sig',$data); //Initiate the 'sig' file with all the data above
  20.                 $this->parser->parse('../../templates/'.$this->config->item('template').'/ucp/footer',$data); //Initiate the 'footer' file with all the data above
  21.         }
2. Мелкий - 25 Августа, 2014 - 14:33:04 - перейти к сообщению
Ошибки нет. Обновите PHP до актуальной версии, этот код требует минимум 5.4.
3. CRAZySTR - 25 Августа, 2014 - 14:47:57 - перейти к сообщению
Мелкий пишет:
Ошибки нет. Обновите PHP до актуальной версии, этот код требует минимум 5.4.

Спасибо, тыкнул бы спасибку но не позволяет кол-во сообщений )

 

Powered by ExBB FM 1.0 RC1