protected function detectFormat() { parent::detectFormat(); // Prevent recursive "partial not found" errors. -- cwells if ($this->format !== 'json' && !file_exists("views/Error/view.{$this->format}.php")) { $this->format = 'html'; } }