From 5f7cf0cd06cf32bc39b91193f939891e36df17fc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 8 Jan 2014 15:23:24 +0000 Subject: fixed usage of uinitialized variable diff --git a/rhimport.pm b/rhimport.pm index b8823ba..fa816e5 100644 --- a/rhimport.pm +++ b/rhimport.pm @@ -343,7 +343,8 @@ sub delete_file sub pv_add_note { my ( $title, $text, $id, $date, $type, $index ) = @_; - my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type, $index ); + my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type); + push(@script , $index) unless (!defined $index); my ($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle ); $writer->autoflush(1); -- cgit v0.10.2