Fixed up a whole bunch of undefined variable warnings. Added a check to make sure raspap.auth exists before trying to include it.

This commit is contained in:
Lawrence
2017-10-02 03:10:04 +08:00
parent a6b1d85013
commit 61d450d1c7
5 changed files with 23 additions and 13 deletions

View File

@@ -19,7 +19,11 @@
*/
define('RASPI_CONFIG', '/etc/raspap');
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
if(file_exists(RASPI_CONFIG.'/raspap.auth')) {
define('RASPI_ADMIN_DETAILS', RASPI_CONFIG.'/raspap.auth');
} else {
define('RASPI_ADMIN_DETAILS','');
}
// Constants for configuration file paths.
// These are typical for default RPi installs. Modify if needed.