From 3c613b7ab4940209d7f229afbb3d66f192c5d696 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 7 May 2020 11:34:44 +0200 Subject: [PATCH] LSauthMethod: don't warn if config file not found --- src/includes/class/class.LSauthMethod.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/includes/class/class.LSauthMethod.php b/src/includes/class/class.LSauthMethod.php index e6b67a10..49b59261 100644 --- a/src/includes/class/class.LSauthMethod.php +++ b/src/includes/class/class.LSauthMethod.php @@ -30,9 +30,12 @@ class LSauthMethod { var $authData = array(); public function __construct() { - // Load config - LSsession :: includeFile(LS_CONF_DIR."LSauth/config.".get_class($this).".php"); - LSdebug(LS_CONF_DIR."LSauth/config.".get_class($this).".php"); + // Load config (without warning if not found) + $conf_file = LS_CONF_DIR."LSauth/config.".get_class($this).".php"; + if (LSsession :: includeFile($conf_file, false, false)) + LSlog :: debug(get_class($this)." :: __construct(): config file ($conf_file) loaded"); + else + LSlog :: debug(get_class($this)." :: __construct(): config file ($conf_file) not found"); return true; }