欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal cron 后 报错 warning: Invalid argument supplied for foreach() in /modules/taxonomy/taxonomy.module on line 1242.

shiping1 的头像

Solution for error:
warning: Invalid argument supplied for foreach () in / var / www / html / modules / taxonomy / taxonomy.module on line 1241.

-> / modules / taxonomy / taxonomy.module on line 1241
/**
* Implementation of hook_nodeapi('update_index').
*/

function taxonomy_node_update_index(&$node) {
$output = array();
if(!empty ($node->taxonomy)){
foreach ($node->taxonomy as $term) {
$output[] = $term->name;
}
}

if (count($output)) {
return '('. implode(', ', $output) .')';
}
}
 

来自 https://www.drupal.org/node/842044
普通分类: