Merge pull request #24282 from owncloud/backport-24262-stable9

[stable9] check whether index is set before using it
This commit is contained in:
C. Montero Luque 2016-04-26 14:49:51 -04:00
commit 36bba77575
1 changed files with 2 additions and 1 deletions

View File

@ -269,7 +269,8 @@ class OC_Installer{
//download the file if necessary
if($data['source']=='http') {
$pathInfo = pathinfo($data['href']);
$path = \OC::$server->getTempManager()->getTemporaryFile('.' . $pathInfo['extension']);
$extension = isset($pathInfo['extension']) ? '.' . $pathInfo['extension'] : '';
$path = \OC::$server->getTempManager()->getTemporaryFile($extension);
if(!isset($data['href'])) {
throw new \Exception($l->t("No href specified when installing app from http"));
}