Skip to content

Commit

Permalink
Fix $gz usage in updateModulesTranslations
Browse files Browse the repository at this point in the history
  • Loading branch information
oleacorner committed Mar 15, 2014
1 parent 0aa7203 commit 00addee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/Language.php
Expand Up @@ -944,7 +944,8 @@ public static function updateModulesTranslations(Array $modules_list)
if (isset($file['filename']) && is_string($file['filename']))
$files_listing[] = $file['filename'];
}
$gz->extractList($files_listing, _PS_TRANSLATIONS_DIR_.'../', '');
if ($gz) // $gz is initialized inside th eforeach... it may not be initialized if no loop is done (case of not conencted to the internet)
$gz->extractList($files_listing, _PS_TRANSLATIONS_DIR_.'../', '');
}
}
}
}

3 comments on commit 00addee

@vigneshwaranr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just going to report this issue. I downloaded the (latest as of now) version 1.6.0.5 and it failed at 67% during "installing modules" step.

The code was trying to download files from translations.prestashop.com and it couldn't due to office firewall blocking downloads. So the $gz is not initialized and fails to execute. This change fixes the problem.

@Oyalunasamuel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please i am having the same problem installing presatashop on my internal server. what should i do?

@Oyalunasamuel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do you have a step by step aproach to solving this problem? i will be glad if you can assist.

Please sign in to comment.