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