Always use `on404Content...` execution path when serving a 404.md

pico-3.0-alpha
Daniel Rudolf 9 years ago
parent 3a36dbd934
commit 6234be88b0
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
  1. 3
      lib/Pico.php

@ -298,7 +298,8 @@ class Pico
// load raw file content // load raw file content
$this->triggerEvent('onContentLoading', array(&$this->requestFile)); $this->triggerEvent('onContentLoading', array(&$this->requestFile));
if (file_exists($this->requestFile)) { $notFoundFile = '404' . $this->getConfig('content_ext');
if (file_exists($this->requestFile) && (basename($this->requestFile) !== $notFoundFile)) {
$this->rawContent = $this->loadFileContent($this->requestFile); $this->rawContent = $this->loadFileContent($this->requestFile);
} else { } else {
$this->triggerEvent('on404ContentLoading', array(&$this->requestFile)); $this->triggerEvent('on404ContentLoading', array(&$this->requestFile));

Loading…
Cancel
Save