php notice fixing

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy 2012-05-21 17:46:20 +02:00
parent 93b353922e
commit 7ce8d94ed9

View File

@ -516,7 +516,7 @@ function tode_node_presave($node) {
// dsm('- - - tode_node_presave'); // dsm('- - - tode_node_presave');
// dsm($node, 'node'); // dsm($node, 'node');
if($node->nid) if(isset($node->nid))
return; return;
$tode_fields = _tode_get_node_tode_fields_def($node); $tode_fields = _tode_get_node_tode_fields_def($node);
@ -529,6 +529,10 @@ function tode_node_presave($node) {
// purpose of that is to directly atribute the right language to the term // purpose of that is to directly atribute the right language to the term
foreach ($tode_fields as $field_name => $field){ foreach ($tode_fields as $field_name => $field){
$tode_field = $node->$field_name; $tode_field = $node->$field_name;
if(!isset($tode_field[$node->language][0]))
continue;
$tode_field_term = $tode_field[$node->language][0]; // on node creation field language is always to und (sure ?) $tode_field_term = $tode_field[$node->language][0]; // on node creation field language is always to und (sure ?)
// // test the language, if not default language create the term name translation // // test the language, if not default language create the term name translation