mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Read array elements instead of substr
Otherwise this would break with 11.0.0 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
ca7f6dec55
commit
067fb18670
1 changed files with 6 additions and 2 deletions
|
|
@ -44,9 +44,13 @@ class AppFetcher extends Fetcher {
|
|||
);
|
||||
|
||||
$this->fileName = 'apps.json';
|
||||
|
||||
$versionArray = \OC_Util::getVersion();
|
||||
$this->endpointUrl = sprintf(
|
||||
'https://apps.nextcloud.com/api/v1/platform/%s/apps.json',
|
||||
substr(implode(\OC_Util::getVersion(), '.'), 0, 5)
|
||||
'https://apps.nextcloud.com/api/v1/platform/%s.%s.%s/apps.json',
|
||||
$versionArray[0],
|
||||
$versionArray[1],
|
||||
$versionArray[2]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue