2008年1月24日 星期四

Drupal 錯誤訊息

錯誤訊息:
date() expects parameter 2 to be long, string given .....token_node.inc

好像就是那個上傳分類的外掛有問題

照這個網頁說明改就可以了
http://drupal.org/node/134168


修改token_node.inc 這個檔案

if (empty($node->created)) {
$node->created = time();
}
$values['yyyy'] = date('Y', $node->created);
$values['yy'] = date('y', $node->created);
$values['month'] = date('F', $node->created);
$values['mon'] = date('M', $node->created);
$values['mm'] = date('m', $node->created);
$values['m'] = date('n', $node->created);
$values['ww'] = date('W', $node->created);
$values['date'] = date('N', $node->created);
$values['day'] = date('l', $node->created);
$values['ddd'] = date('D', $node->created);
$values['dd'] = date('d', $node->created);
$values['d'] = date('j', $node->created);

if (!(empty($node->changed))) {
$values['mod-yyyy'] = date('Y', $node->changed);
$values['mod-yy'] = date('y', $node->changed);
$values['mod-month'] = date('F', $node->changed);
$values['mod-mon'] = date('M', $node->changed);
$values['mod-mm'] = date('m', $node->changed);
$values['mod-m'] = date('n', $node->changed);
$values['mod-ww'] = date('W', $node->changed);
$values['mod-date'] = date('N', $node->changed);
$values['mod-day'] = date('l', $node->changed);
$values['mod-ddd'] = date('D', $node->changed);
$values['mod-dd'] = date('d', $node->changed);
$values['mod-d'] = date('j', $node->changed);
}


--

改完後 上傳檔案不會出現奇怪的錯誤訊息XD

沒有留言: