--- domain_source.module	2008-02-29 15:15:20.000000000 -0500
+++ domain_source_new.module	2008-02-29 15:46:18.000000000 -0500
@@ -94,14 +94,15 @@ function domain_source_form_alter($form_
 function domain_source_nodeapi(&$node, $op, $a3, $a4) {
   switch ($op) {
     case 'validate':
-      $key = $node->domain_source;
-      if ($node->domain_site && $key == 0) {
+      // Cast the key from zero to -1 to match the data coming from the input.
+      ($node->domain_source == 0) ? $key = -1 : $key = $node->domain_source;
+      if ($node->domain_site && $key == -1) {
         // This case is acceptable, so we let it pass.
         // I find this code easier to read than a compound IF statement.
       }
       // Here we account for both the 'domains_raw' and 'domains' options.
-      // If selected, these calues will not be zero.
-      else if (!$node->domains[$key] && !$node->domains_raw[$key]) {
+      // If selected, these clauses will not be zero.
+      else if (!$node->domains[$key] && (!empty($node->domains_raw) && !in_array($key, $node->domains_raw))) {
         form_set_error('domain_source', t('The source affiliate must be selected as a publishing option.'));
       }
       break;
