Fix of bug 711, "No message named WhereisMySQL in Install.pm".
authoracli <acli>
Mon, 9 Feb 2004 22:36:32 +0000 (22:36 +0000)
committeracli <acli>
Mon, 9 Feb 2004 22:36:32 +0000 (22:36 +0000)
Added defined() check for
"Use of uninitialized value in -e at Install.pm line 2085, <STDIN> line 32."

misc/Install.pm

index a4cfe8e..44b5590 100644 (file)
@@ -997,7 +997,7 @@ sub getmysqldir {
     }
     if (!$mysqldir){
        for (;;) {
-           $mysqldir = showmessage(getmessage('WhereisMySQL'),'free');
+           $mysqldir = showmessage(getmessage('WhereIsMySQL'),'free');
            last if -f "$mysqldir/bin/mysqladmin";
        }
     }
@@ -2079,10 +2079,10 @@ sub backupmycnf {
 }
 
 sub restoremycnf {
-       if (-e $mycnf) {
+       if (defined $mycnf && -e $mycnf) {
                unlink($mycnf);
        }
-       if (-e $mytmpcnf) {
+       if (defined $mytmpcnf && -e $mytmpcnf) {
                rename $mytmpcnf,$mycnf;
        }
 }