Use $settings or $config instead of $conf in the settings file

Created on 2 June 2022, over 2 years ago
Updated 16 March 2023, almost 2 years ago

Problem/Motivation

The documentation says:

$conf['ip_whitelist'] = ['127.0.0.1'];

But this doesn't work. The code actually calls $ip_whitelist = $this->config->get('ip_whitelist') which can only be set with:

$config['restrict_ip.settings']['ip_whitelist'] = ['127.0.0.1'];

That ends up being a bit odd since that is overriding info in the database not the configuration.

Perhaps it would be better to change it to $settings['ip_whitelist'] = ['127.0.0.1']; and $ip_whitelist = Settings::get('restrict_ip_ip_whitelist', []); instead.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Documentation

Created by

🇨🇦Canada nubeli

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024