]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 666781 - t/008filter.t should not require filterexceptions.pl when one does not...
authorDavid Lawrence <dlawrence@mozilla.com>
Tue, 28 Jun 2011 20:46:35 +0000 (16:46 -0400)
committerDavid Lawrence <dlawrence@mozilla.com>
Tue, 28 Jun 2011 20:46:35 +0000 (16:46 -0400)
r/a=mkanat

t/008filter.t

index a2f96ae3eab2916df65cd2232e4c39c59a41fa10..e73d2383553f3ae1f2f5ee3b7c81790c98794016 100644 (file)
@@ -61,11 +61,7 @@ foreach my $path (@Support::Templates::include_paths) {
     chdir $path; # relative path
     
     # We load a %safe list of acceptable exceptions.
-    if (!-r "filterexceptions.pl") {
-        ok(0, "$path has templates but no filterexceptions.pl file. --ERROR");
-        next;
-    }
-    else {
+    if (-r "filterexceptions.pl") {
         do "filterexceptions.pl";
         if (ON_WINDOWS) {
           # filterexceptions.pl uses / separated paths, while 
@@ -86,10 +82,12 @@ foreach my $path (@Support::Templates::include_paths) {
     # us to flag which members were not found, and report that as a warning, 
     # thereby keeping the lists clean.
     foreach my $file (keys %safe) {
-        my $list = $safe{$file};
-        $safe{$file} = {};
-        foreach my $directive (@$list) {
-            $safe{$file}{$directive} = 0;    
+        if (ref $safe{$file} eq 'ARRAY') {
+            my $list = $safe{$file};
+            $safe{$file} = {};
+            foreach my $directive (@$list) {
+                $safe{$file}{$directive} = 0;    
+            }
         }
     }