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:
Lukas Reschke 2016-10-28 10:13:02 +02:00
parent ca7f6dec55
commit 067fb18670
No known key found for this signature in database
GPG key ID: B9F6980CF6E759B1

View file

@ -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]
);
}
}