From 27d83a87d5d161b0f41cf8cdea726bcdfd492d57 Mon Sep 17 00:00:00 2001 From: daeks Date: Wed, 18 Feb 2015 20:11:11 +0100 Subject: [PATCH] fix for https://github.com/Codiad/Codiad/issues/766 --- components/market/class.market.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/market/class.market.php b/components/market/class.market.php index 97a37b6..2b4d24f 100644 --- a/components/market/class.market.php +++ b/components/market/class.market.php @@ -202,7 +202,8 @@ class Market extends Common { } } } else { - $tmp = file_get_contents($this->url.'/?t='.rtrim($type, "s").'&i='.str_replace("-master","", array_pop(explode('/', $repo)))); + $reponame = explode('/', $repo); + $tmp = file_get_contents($this->url.'/?t='.rtrim($type, "s").'&i='.str_replace("-master","", $reponame[sizeof($repo)-1])); } if(file_put_contents(BASE_PATH.'/'.$type.'/'.$name.'.zip', fopen($repo.'/archive/master.zip', 'r'))) { $zip = new ZipArchive;