# Bug NEX-419 - Nextcoud version compare leads to unexpected failure sometimes 

Project: Stream Nextcloud app "OpenProject Integration"
Status: closed
URL: https://community.openproject.org/work_packages/NEX-419

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | Nextcloud Integration 2.7.1 |
| Observed in versions | Nextcloud Integration 2.7.0 |
| Bug found in version (deprecated) | Nextcloud Integration 2.7.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Dominic Bräunlein |
| Product manager |  |
| Developers |  |
| Designer |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

We have different checks in our app (integration\_openproject) that get nextcloud server version and do the stuff according to the version of nextcloud version that the user is using. Foe getting the version we have used method `getVersionString()` which might lead `version_compare()`  to unexpected failure. To avoid this its very safe to use   `getVersion()` array version for getting the nextcloud server version.

<br>

A fix for it has been made with PR: <https://github.com/nextcloud/integration_openproject/pull/720>

For Developers:

**TODO:**

- [ ] Add some php unit tests  can be added similar to this in this file <https://github.com/nextcloud/integration\_openproject/blob/eb4d3ff0f3253cf5fe77754e5f4c6207eefe49d4/tests/lib/Service/OauthSeviceTest.php#L59C18-L59C63>

<br>

### For QA-Testing:

Needs Developer testing

To Be provided\!

<br>
