From 0be10caff650a77e7e524572d33a6882d375f08a Mon Sep 17 00:00:00 2001 From: alban Date: Fri, 21 Mar 2014 11:27:03 +0100 Subject: [PATCH] [fix] phpunit errors with uninitialized * variables --- phpunit/bootstrap.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/phpunit/bootstrap.php b/phpunit/bootstrap.php index 20c3e2fe..e42e3d63 100644 --- a/phpunit/bootstrap.php +++ b/phpunit/bootstrap.php @@ -52,12 +52,16 @@ foreach ($configFile as $line) { // ******************** // Define constants from vars of /etc/alternc/local.sh -define('ALTERNC_MAIL', "$L_ALTERNC_MAIL"); -define('ALTERNC_HTML', "$L_ALTERNC_HTML"); +if( isset ($L_ALTERNC_MAIL) ) { + define('ALTERNC_MAIL', "$L_ALTERNC_MAIL"); +}if( isset ($ALTERNC_HTML) ) { + define('ALTERNC_HTML', "$ALTERNC_HTML"); +}if( isset ($ALTERNC_LOGS) ) { + define('ALTERNC_LOGS', "$ALTERNC_LOGS"); +} if(isset($L_ALTERNC_LOGS_ARCHIVE)){ define('ALTERNC_LOGS_ARCHIVE', "$L_ALTERNC_LOGS_ARCHIVE"); } -define('ALTERNC_LOGS', "$L_ALTERNC_LOGS"); define('ALTERNC_LOCALES', ALTERNC_PANEL."/locales"); define('ALTERNC_LOCK_JOBS', '/var/run/alternc/jobs-lock'); define('ALTERNC_LOCK_PANEL', '/var/lib/alternc/panel/nologin.lock');