aboutsummaryrefslogtreecommitdiffstats
path: root/lib/FIDD.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/FIDD.php')
-rw-r--r--lib/FIDD.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/FIDD.php b/lib/FIDD.php
index d15ab35..b61132d 100644
--- a/lib/FIDD.php
+++ b/lib/FIDD.php
@@ -109,9 +109,11 @@ class FIDD
if ($ret === 0) {
foreach ($out as $line) {
$line = explode("\t", trim($line));
- if (trim(substr($line[1], -3, 3)) == 'iso') {
- $file = explode('/', $line[1]);
- $isos[$file[1]] = formatBytes($line[0], 1);
+ if (count($line) > 1) {
+ if (trim(substr($line[1], -3, 3)) == 'iso') {
+ $file = explode('/', $line[1]);
+ $isos[$file[1]] = formatBytes($line[0], 1);
+ }
}
}
}
@@ -169,7 +171,9 @@ class FIDD
}
- if (null !== ($ret = self::is_correct_name($data['file']))) {
+ if ( count($data) == 0) {
+ // skip the first one
+ } else if (null !== ($ret = self::is_correct_name($data['file']))) {
$data['path'] = sprintf('%s/%s',
$ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : 'iso/cauldron',
str_replace('.iso', '', $data['file'])