Bug 16154: Fix some other occurrences
[koha.git] / virtualshelves / shelves.pl
index 53d39a7..1278305 100755 (executable)
@@ -92,12 +92,12 @@ if ( $op eq 'add_form' ) {
     if ( $shelf ) {
         $op = $referer;
         if ( $shelf->can_be_managed( $loggedinuser ) ) {
-            $shelf->shelfname( $query->param('shelfname') );
-            $shelf->sortfield( $query->param('sortfield') );
-            $shelf->allow_add( $query->param('allow_add') );
-            $shelf->allow_delete_own( $query->param('allow_delete_own') );
-            $shelf->allow_delete_other( $query->param('allow_delete_other') );
-            $shelf->category( $query->param('category') );
+            $shelf->shelfname( scalar $query->param('shelfname') );
+            $shelf->sortfield( scalar $query->param('sortfield') );
+            $shelf->allow_add( scalar $query->param('allow_add') );
+            $shelf->allow_delete_own( scalar $query->param('allow_delete_own') );
+            $shelf->allow_delete_other( scalar $query->param('allow_delete_other') );
+            $shelf->category( scalar $query->param('category') );
             eval { $shelf->store };
 
             if ($@) {
@@ -302,7 +302,7 @@ $template->param(
     shelf    => $shelf,
     messages => \@messages,
     category => $category,
-    print    => $query->param('print') || 0,
+    print    => scalar $query->param('print') || 0,
     csv_profiles => GetCsvProfilesLoop('marc'),
 );