From 697d4aff274913901d822a86f10099248c22980a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 13 Mar 2015 08:56:37 +0100 Subject: [PATCH] doc/search: do not break on "ill-formed" docs We got ugly exceptions for non-obvious errors such as missing titles --- .../doc/application/controllers/SearchController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/doc/application/controllers/SearchController.php b/modules/doc/application/controllers/SearchController.php index f4740f027..5df4ffeb3 100644 --- a/modules/doc/application/controllers/SearchController.php +++ b/modules/doc/application/controllers/SearchController.php @@ -36,15 +36,15 @@ class Doc_SearchController extends DocController if (($path = $this->getModulePath($module)) !== null) { try { $parser = new DocParser($path); + $search = new DocSearchRenderer( + new DocSearchIterator( + $parser->getDocTree()->getIterator(), + new DocSearch($this->params->get('q')) + ) + ); } catch (DocException $e) { continue; } - $search = new DocSearchRenderer( - new DocSearchIterator( - $parser->getDocTree()->getIterator(), - new DocSearch($this->params->get('q')) - ) - ); $search ->setUrl('doc/module/chapter') ->setUrlParams(array('moduleName' => $module));