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

pico-3.0-alpha
Daniel Rudolf 10 years ago
parent 3798cbe478
commit 43f953b67a
  1. 3
      lib/Pico.php

@ -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 {

Loading…
Cancel
Save