mirror of
https://github.com/friendica/friendica
synced 2025-04-26 20:30:11 +00:00
Add error message when setting config to existing value
This commit is contained in:
parent
0649d2c393
commit
4858993024
2 changed files with 28 additions and 2 deletions
|
@ -128,6 +128,10 @@ HELP;
|
|||
throw new RuntimeException("$cat.$key is an array and can't be set using this command.");
|
||||
}
|
||||
|
||||
if ($this->config->get($cat, $key) == $value) {
|
||||
throw new RuntimeException("$cat.$key already set to $value.");
|
||||
}
|
||||
|
||||
$result = $this->config->set($cat, $key, $value);
|
||||
if ($result) {
|
||||
$this->out("{$cat}.{$key} <= " .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue