Bug 6488 adding a 2nd \n to silence logs
authorPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Feb 2012 14:21:25 +0000 (15:21 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 2 Feb 2012 14:21:25 +0000 (15:21 +0100)
YAML don't like when you try to open a YAML file with just a \n. This patch add a 2nd \n to silence logs.

C4/Items.pm

index eb1c51c..04cb417 100644 (file)
@@ -1629,7 +1629,7 @@ sub GetHiddenItemnumbers {
     my @resultitems;
 
     my $yaml = C4::Context->preference('OpacHiddenItems');
-    $yaml = "$yaml\n"; # YAML is anal on ending \n. Surplus does not hurt
+    $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt
     my $hidingrules;
     eval {
         $hidingrules = YAML::Load($yaml);