Pico::readPages(): Call Pico::parseFileMeta() again when a exception is thrown

This commit is contained in:
Daniel Rudolf 2015-12-21 04:08:35 +01:00
parent 3798cbe478
commit 43f953b67a

View file

@ -962,8 +962,7 @@ class Pico
try {
$meta = $this->parseFileMeta($rawContent, $headers);
} catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
$meta = array_fill_keys(array_keys($headers), '');
$meta['time'] = $meta['date_formatted'] = '';
$meta = $this->parseFileMeta('', $headers);
$meta['YAML_ParseError'] = $e->getMessage();
}
} else {