bug5455 (Fix uninitialized-warnings on authorities.pl)
authorMarcel de Rooy <M.de.Rooy@rijksmuseum.nl>
Thu, 9 Dec 2010 12:36:07 +0000 (12:36 +0000)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 12 Dec 2010 09:50:01 +0000 (22:50 +1300)
Fix warnings for uninitialized authtypecode on lines 646, 653.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
authorities/authorities.pl

index 9429a58..d4f1601 100755 (executable)
@@ -545,7 +545,9 @@ my $linkid=$input->param('linkid');
 my $authtypecode = $input->param('authtypecode');
 
 my $dbh = C4::Context->dbh;
-$authtypecode = &GetAuthTypeCode($authid) if !$authtypecode;
+if(!$authtypecode) {
+  $authtypecode = $authid? &GetAuthTypeCode($authid): '';
+}
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "authorities/authorities.tmpl",