mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-28 05:58:40 -04:00
Fix wrong order of args in extension compatibility check (#9445)
See https://www.php.net/manual/function.version-compare.php The extension's minimum required FreshRSS version must be compared against the currently running version, not the other way around. Assuming the running FreshRSS version is `1.30.1`: | Minimum required version | Expected status | Before this fix | After this fix | |---|---|---|---| | `1.27.0` | ✅ Compatible | ❌ Incompatible | ✅ Compatible | | `1.30.1` | ✅ Compatible | ✅ Compatible | ✅ Compatible | | `1.31.0` | ❌ Incompatible | ✅ Compatible | ❌ Incompatible |
This commit is contained in:
1 parent
6d30fb4af0
commit
ed34f6a21d
1 file changed
+1
-1
@@ -112,7 +112,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
|
||||
|
||||
return array_map(static function (array $extension) {
|
||||
if ($extension['compatibility'] !== '✔') {
|
||||
$extension['compatibility'] = version_compare($extension['compatibility'], FRESHRSS_VERSION, '>=') ? '✔' : '✘';
|
||||
$extension['compatibility'] = version_compare(FRESHRSS_VERSION, $extension['compatibility'], '>=') ? '✔' : '✘';
|
||||
}
|
||||
return $extension;
|
||||
}, $extensions);
|
||||
|
||||
Reference in new issue
Block a user