BackupPC-users

Re: [BackupPC-users] realindex.cgi: defined(@array) is deprecated

2015-01-07 07:31:35
Subject: Re: [BackupPC-users] realindex.cgi: defined(@array) is deprecated
From: Alexander Moisseev <moiseev AT mezonplus DOT ru>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 07 Jan 2015 15:29:59 +0300
Yes, you can remove the highlighted text. If @Backups is undefined then 
condition "@Backups > 0" is false.

http://perldoc.perl.org/perldiag.html#defined(@array)-is-deprecated


--- a/lib/BackupPC/CGI/Browse.pm
+++ b/lib/BackupPC/CGI/Browse.pm
@@ -65,7 +65,7 @@ sub action
      #
      # default to the newest backup
      #
-    if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
+    if ( !defined($In{num}) && @Backups > 0 ) {
          $i = @Backups - 1;
          $num = $Backups[$i]{num};
      }

--
Alexander

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>