We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug intval in function below with version string starting with v e.g. v1.6.1 always return 0 --> 0 < 0 --> false
pfsense-api/pfSense-pkg-API/files/etc/inc/api/models/APISystemAPIVersionRead.inc
Line 68 in 1b19911
I would recommend to use php version_compare() return version_compare(self::get_api_version(), self::get_latest_api_version()) == -1;
return version_compare(self::get_api_version(), self::get_latest_api_version()) == -1;
that work in my tests and also handles thing like 1.12.1 lower version then 2.0.1
To Reproduce Steps to reproduce the behavior:
Expected behavior Return true if new API version is available
Screenshots or Response n/a
pfSense Version & Package Version:
Affected Endpoints:
Additional context
The text was updated successfully, but these errors were encountered:
Sounds like a great option. I'll include this in the next patch.
Thanks!
Sorry, something went wrong.
fix: use version_compare for api update checks #390
080783a
jaredhendrickson13
Successfully merging a pull request may close this issue.
Describe the bug
intval in function below with version string starting with v e.g. v1.6.1 always return 0 --> 0 < 0 --> false
pfsense-api/pfSense-pkg-API/files/etc/inc/api/models/APISystemAPIVersionRead.inc
Line 68 in 1b19911
I would recommend to use php version_compare()
return version_compare(self::get_api_version(), self::get_latest_api_version()) == -1;
that work in my tests and also handles thing like 1.12.1 lower version then 2.0.1
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Return true if new API version is available
Screenshots or Response
n/a
pfSense Version & Package Version:
Affected Endpoints:
Additional context
The text was updated successfully, but these errors were encountered: