From d2da9f4e584fa46292c2dfef6dfc1df087e2b25d Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 6 Mar 2012 05:49:08 +0000 Subject: [PATCH] issue 871, added protection codes for autoinstall git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10334 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/autoinstall/autoinstall.lib.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/autoinstall/autoinstall.lib.php b/modules/autoinstall/autoinstall.lib.php index 99280f417..cd3b2fa02 100644 --- a/modules/autoinstall/autoinstall.lib.php +++ b/modules/autoinstall/autoinstall.lib.php @@ -140,10 +140,13 @@ $_files = $oTar->files; $file_list = array(); - foreach($_files as $key => $info) { - FileHandler::writeFile($this->download_path."/".$info['name'], $info['file']); - $file_list[] = $info['name']; - } + if(is_array($_files)) + { + foreach($_files as $key => $info) { + FileHandler::writeFile($this->download_path."/".$info['name'], $info['file']); + $file_list[] = $info['name']; + } + } return $file_list; }