From 863f3693a1ccf147a792f537a70333ac5fd5da39 Mon Sep 17 00:00:00 2001 From: artmasterpl <32453641+artmasterpl@users.noreply.github.com> Date: Thu, 21 Jun 2018 14:00:30 +0100 Subject: [PATCH] Update setup.php Undefined index error -fixed The break statement is no longer allowed to use in php7 inside loops, it has been replaced with "return false". --- dashboard/setup.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dashboard/setup.php b/dashboard/setup.php index 1e056d4..6f65ae9 100644 --- a/dashboard/setup.php +++ b/dashboard/setup.php @@ -23,7 +23,8 @@ } // Create database... if (isset($_GET['createDB'])) { - if ($_POST['go'] == 'create') { + // This will fix undefined index error + if (iseet($_POST['go']) && $_POST['go'] == 'create') { $handle = fopen($databaseSchema, "r"); $createTable_events = fread($handle, filesize($databaseSchema)); @@ -405,7 +406,8 @@ // in case of some error, exit if ($configphpError) { print "Configuration file \"config.php\" has errors, check above what's wrong. After solved, run setup again!
"; - break; + // break statement is no longer allowed to use in php7 inside "if" + return false; } else { print "   Config looks correct.
"; } @@ -504,7 +506,8 @@ } if ($extensionError) { print "Erro in PHP Extensions, check above what's wrong. After dependency solved, run setup again!
"; - break; + // break statement is no longer allowed to use in php7 inside "if" + return false ; } print "
";