From d3a8aaef510a9fcf99a5ae6abdfe9a2ccc06d4e9 Mon Sep 17 00:00:00 2001 From: Deltawings <77517677+Deltawings@users.noreply.github.com> Date: Wed, 10 Nov 2021 22:25:51 +0100 Subject: [PATCH] Constants definition logic modification Correction avoiding script exit when configuration file doesn't exist because MySQL connection constants can also be set at the beginning of this script. --- agent-local/mysql | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/agent-local/mysql b/agent-local/mysql index 0b9419f..c56e4e7 100755 --- a/agent-local/mysql +++ b/agent-local/mysql @@ -27,9 +27,9 @@ if (!array_key_exists('SCRIPT_FILENAME', $_SERVER) # ============================================================================ # CONFIGURATION # ============================================================================ -# Define MySQL connection constants in config.php. Instead of defining -# parameters here, you can define them in another file named the same as this -# file, with a .cnf extension. +# Define MySQL connection constants. Instead of defining parameters here, +# you can also define them in another file named the same as this +# file with a .cnf extension. # ============================================================================ $mysql_user = ''; @@ -77,9 +77,6 @@ echo("<<>>\n"); if (file_exists(__FILE__ . '.cnf' ) ) { require(__FILE__ . '.cnf'); debug('Found configuration file ' . __FILE__ . '.cnf'); -} else { - echo("No ".__FILE__ . ".cnf found!\n"); - exit(); } # Make this a happy little script even when there are errors.