Add deprecation warning for Setting::getValue

[MAILPOET-1802]
This commit is contained in:
Rostislav Wolny
2019-02-11 16:42:36 +01:00
committed by M. Shull
parent 898d61de2d
commit df40833024

View File

@ -26,6 +26,7 @@ class Setting extends Model {
* @deprecated
*/
public static function getValue($key, $default = null) {
trigger_error('Calling Settings::getValue() is deprecated and will be removed. Use \MailPoet\Settings\SettingsController instead.', E_USER_DEPRECATED);
$settings = new SettingsController();
$settings->get($key, $default);
}