Commit 7f0acced authored by yched's avatar yched

#114346 - fix error on empty noderef fields (select widget)

parent 3c23a93c
......@@ -109,7 +109,7 @@ function nodereference_field($op, &$node, $field, &$items, $teaser, $page) {
case 'validate':
$refs = _nodereference_potential_references($field, TRUE);
foreach ($items as $delta => $item) {
if (isset($item['nid'])) {
if (!empty($item['nid'])) {
$error_field = isset($item['error_field']) ? $item['error_field'] : '';
unset($item['error_field']);
if (!in_array($item['nid'], array_keys($refs))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment