summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCzövek András2011-05-13 13:44:03 (GMT)
committerCzövek András2011-05-13 13:44:03 (GMT)
commit034c805a9c126758a1f991b6293911b8ee99e489 (patch)
tree28d9600453f34490b417f68d78aba4906bd32429
parent201e5fa6b04c0ab2c44b0fa1f71c6f38986d391c (diff)
Issue #1148948 by gtill: Fixing notice message when referencing a new node.
-rw-r--r--corresponding_node_references.crud.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/corresponding_node_references.crud.inc b/corresponding_node_references.crud.inc
index 09b80ea..dece0bf 100644
--- a/corresponding_node_references.crud.inc
+++ b/corresponding_node_references.crud.inc
@@ -31,7 +31,7 @@ function corresponding_node_references_insert($home_node, $home_field, $away_nod
// Add the new reference.
// If there are no other references, we need to make sure this
// is delta 0
- if ($referenced_node->{$away_field}[$lang][0]['nid'] == NULL) {
+ if (array_key_exists($lang, $referenced_node->{$away_field}) == FALSE || $referenced_node->{$away_field}[$lang][0]['nid'] == NULL) {
$referenced_node->{$away_field}[$lang][0]['nid'] = $home_node->nid;
}
else {