To participate you must create an account on apostrophenow.com. If you have already done so, click Login.

Changeset 1840

Show
Ignore:
Timestamp:
07/23/2010 05:50:57 PM (6 weeks ago)
Author:
tboutell
Message:

Zend can throw exceptions if it doesn't like search syntax. Catch the exceptions and report no results (TODO: handle this more elegantly by showing the error perhaps).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.4/lib/action/BaseaActions.class.php

    r1696 r1840  
    591591    } 
    592592 
    593     $values = aZendSearch::searchLuceneWithValues(Doctrine::getTable('aPage'), $q, aTools::getUserCulture()); 
     593    try 
     594    { 
     595      $values = aZendSearch::searchLuceneWithValues(Doctrine::getTable('aPage'), $q, aTools::getUserCulture()); 
     596    } catch (Exception $e) 
     597    { 
     598      // Lucene search error. TODO: display it nicely if they are always safe things to display. For now: just don't crash 
     599      $values = array(); 
     600    } 
    594601 
    595602    $nvalues = array();