To participate you must create an account on apostrophenow.com. If you have already done so, click Login.
Changeset 1840
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1696
|
r1840
|
|
| 591 | 591 | } |
| 592 | 592 | |
| 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 | } |
| 594 | 601 | |
| 595 | 602 | $nvalues = array(); |
Download in other formats: