Pico::readPages(): Call Pico::parseFileMeta() again when a exception is thrown
This commit is contained in:
parent
3798cbe478
commit
43f953b67a
@ -962,8 +962,7 @@ class Pico
|
|||||||
try {
|
try {
|
||||||
$meta = $this->parseFileMeta($rawContent, $headers);
|
$meta = $this->parseFileMeta($rawContent, $headers);
|
||||||
} catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
|
} catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
|
||||||
$meta = array_fill_keys(array_keys($headers), '');
|
$meta = $this->parseFileMeta('', $headers);
|
||||||
$meta['time'] = $meta['date_formatted'] = '';
|
|
||||||
$meta['YAML_ParseError'] = $e->getMessage();
|
$meta['YAML_ParseError'] = $e->getMessage();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user