From 2289096cccf725662c1c4a12c39c70f4b01b2cf3 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 18 Mar 2014 21:57:47 +0000 Subject: [PATCH] Config.php: - do not error_log() 'undefined config option' for deprecated options git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1659 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/Config.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/model/Config.php b/model/Config.php index 821e310c..4d74a674 100644 --- a/model/Config.php +++ b/model/Config.php @@ -7,6 +7,11 @@ final class Config { private static $instance = null; + # do not error_log() 'undefined config option' for deprecated options + private static $deprecated_options = array( + 'min_password_length', + ); + /** * Return a singleton instance of Configure. * @@ -102,7 +107,10 @@ final class Config { break; } - error_log('Config::read(): attempt to read undefined config option "' . join('.', $name) . '", returning null'); + if ( !in_array(join('.', $name), self::$deprecated_options) ) { + error_log('Config::read(): attempt to read undefined config option "' . join('.', $name) . '", returning null'); + } + return null; }