Skip to content

Commit

Permalink
Update installer.php
Browse files Browse the repository at this point in the history
Changed on line 282:
foreach (glob($next) as $file) 
now changed to: 
foreach ((array)glob($next) as $file) 

Adding the (array) allows for uploads of the ocmod.zip files with an empty upload folder, as it checks id glob($next) is an array. in the original code there could be an error if the upload folder was empty and without the folder, the upload with a zip file won't work.

You still want to use the zip in case you have both and xml and sql file to install your ocmod.
  • Loading branch information
QualityWorks committed May 6, 2015
1 parent 0cc21e9 commit f1e7bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/admin/controller/extension/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function ftp() {
while (count($path) != 0) {
$next = array_shift($path);

foreach (glob($next) as $file) {
foreach ((array)glob($next) as $file) {
if (is_dir($file)) {
$path[] = $file . '/*';
}
Expand Down

0 comments on commit f1e7bbf

Please sign in to comment.