我在drupal 7.10中安裝了「Business Connect」主題,該主題工作正常,但有一段時間我收到這些錯誤消息。如果我安裝另一個主題,則不會顯示錯誤消息,這意味着問題出在「Business Connect」主題的template.php文件。使用「Business Connect」主題與drupal 7時未定義偏移1錯誤
錯誤消息:
Notice: Undefined offset: 1 in businessconnect_process_page() (line 44 of
C:\xampp\htdocs\my-site-name\sites\all\themes\businessconnect\template.php).
Notice: Undefined offset: 2 in businessconnect_process_page() (line 44 of
C:\xampp\htdocs\my-site-name\sites\all\themes\businessconnect\template.php).
Notice: Undefined offset: 3 in businessconnect_process_page() (line 44 of
\C:\xampp\htdocs\my-site-name\sites\all\themes\businessconnect\template.php).
的template.php代碼:
if ($variables['is_front'])
{
$variable=$variables['title'];
$text=(explode(" ", $variable));
$variables['title'] = '<span>'.$text[0].' '.$text[1].' '.'<span class="title_default">'.$text[2].' '.$text[3].'</span>'.'</span>';
}
線#44:
$variables['title'] = '<span>'.$text[0].' '.$text[1].' '.'<span class="title_default">'.$text[2].' '.$text[3].'</span>'.'</span>';
看起來像是誰創建了「業務連接」,他們需要學習使用'E_ALL | E_STRICT'啓用:) – rdlowrey 2012-01-02 16:48:15
請與您的主題供應商聯繫並討論那裏的問題。否則,請等到相同主題的用戶出現在這裏,這可能不是最好的地方。 – hakre 2012-01-02 16:48:38
另請[請閱讀常見問題](http://stackoverflow.com/faq)本網站可接受哪類問題。這是一個編程網站,而不是一個具體的我有一個XYZ類型的網站主題的問題。 – hakre 2012-01-02 16:50:08