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:
Inverle authored and GitHub committed 2026-10-15 19:47:06 +02:00
1 parent 6d30fb4af0
commit ed34f6a21d
1 file changed
+1 -1
+1 -1
View File
@@ -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);