diff --git a/config.php b/config.php index b8820d5..c1d07db 100644 --- a/config.php +++ b/config.php @@ -66,7 +66,8 @@ class config /** Define a value for the parameter in the config file. Add all the default values if they are not defined @param string $param The option name - @param mixed $value The option value */ + @param mixed $value The option value + @return TRUE if the parameter is saved or an exception */ public function set ($param, $value) { if (!array_key_exists ($param, $this->default)) @@ -101,6 +102,7 @@ class config if (@file_put_contents ($this->confFile, $txt, LOCK_EX) === FALSE) throw new Exception (sprintf ("Can't save configuration file '%s'", $this->confFile)); + return TRUE; } /** Display the $values in PHP format to be "require" easily