Fix
This commit is contained in:
		| @@ -22,6 +22,9 @@ class SettingsManager{ | ||||
| 	} | ||||
|  | ||||
| 	public static function update ($name, $value) { | ||||
| 		if ($this.getByName($name)){ | ||||
| 			$this->create($name, $value); | ||||
| 		} else { | ||||
| 			try { | ||||
| 				Db::edit ('settings', ['value' => $value], 'WHERE name = ?', array($name)); | ||||
| 			} catch(PDOException $error) { | ||||
| @@ -30,4 +33,5 @@ class SettingsManager{ | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| ?> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user