--- watermark.module	2007-06-27 19:23:38.000000000 +0200
+++ watermark_fixed.module	2007-07-03 19:36:58.390625000 +0200
@@ -498,8 +498,9 @@ function _watermark_is_node_excluded($no
     $gallery_vid = _watermark_get_gallery_vid();
 
     foreach ($node->taxonomy as $vid => $tids) {
-      if ($vid == $gallery_vid) {
-
+      // taxonomy is an nested array when multiple selection
+      // of terms in the gallery vocabulary is allowed
+      if (is_array($tids) && $vid == $gallery_vid) {
         foreach ($tids as $tid => $status) {
           if ($status!=0 && in_array($tid, $excluded_tids)) {
             // at least one term matches excluded terms
@@ -507,6 +508,11 @@ function _watermark_is_node_excluded($no
           }
         }
       }
+      // it's not a multiple select vocabulary
+      else if (!empty($tids) && $vid == $gallery_vid && in_array($tids, $excluded_tids)) {
+        // excluded term found
+        return true;
+      }
     }
   }
   return false;
