diff --git a/htdocs/login_form.php b/htdocs/login_form.php index e8e02ca..669e915 100644 --- a/htdocs/login_form.php +++ b/htdocs/login_form.php @@ -45,7 +45,7 @@ printf('%s:', ($app['server']->getValue('login','attr') == 'dn' ? _('Login DN') : $_SESSION[APPCONFIG]->getFriendlyName($app['server']->getValue('login','attr')))); printf('', - $app['server']->getValue('login','attr') == 'dn' ? $app['server']->getValue('login','bind_id') : ''); + $app['server']->getValue('login','attr',false) == 'dn' ? $app['server']->getValue('login','bind_id') : ''); echo ' '; printf('%s:',_('Password')); diff --git a/lib/ds.php b/lib/ds.php index 1c2ff14..bd8cc5e 100644 --- a/lib/ds.php +++ b/lib/ds.php @@ -69,16 +69,18 @@ abstract class DS { /** * Return a configuration value */ - public function getValue($key,$setting) { + public function getValue($key,$setting,$fatal=true) { if (isset($this->custom->{$key}[$setting])) return $this->custom->{$key}[$setting]; elseif (isset($this->default->{$key}[$setting]) && array_key_exists('default',$this->default->{$key}[$setting])) return $this->default->{$key}[$setting]['default']; - else { + elseif ($fatal) debug_dump_backtrace("Error trying to get a non-existant value ($key,$setting)",1); - } + + else + return null; } /**