diff options
| author | 2018-06-16 09:59:46 +0200 | |
|---|---|---|
| committer | 2018-06-16 09:59:46 +0200 | |
| commit | 3306a1679c2570c30d4b662c887b4a71ce147398 (patch) | |
| tree | 35fb1616c1166723676c789d6127a98db3260148 /lib/Minz/Configuration.php | |
| parent | c0122003fe3031926546012b86a38b5187082613 (diff) | |
| parent | 8fcacc8cf41c14dd7d9712329d75ff4f041f3caf (diff) | |
Merge pull request #1921 from FreshRSS/dev1.11.1
FreshRSS 1.11.1
Diffstat (limited to 'lib/Minz/Configuration.php')
| -rw-r--r-- | lib/Minz/Configuration.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 5470dc85f..3e486d68e 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -90,15 +90,15 @@ class Minz_Configuration { private $configuration_setter = null; public function removeExtension($ext_name) { - self::$extensions_enabled = array_diff( - self::$extensions_enabled, - array($ext_name) - ); + unset(self::$extensions_enabled[$ext_name]); + $legacyKey = array_search($ext_name, self::$extensions_enabled, true); + if ($legacyKey !== false) { //Legacy format FreshRSS < 1.11.1 + unset(self::$extensions_enabled[$legacyKey]); + } } public function addExtension($ext_name) { - $found = array_search($ext_name, self::$extensions_enabled) !== false; - if (!$found) { - self::$extensions_enabled[] = $ext_name; + if (!isset(self::$extensions_enabled[$ext_name])) { + self::$extensions_enabled[$ext_name] = true; } } |
