Bug #26807
Bug in try/catch in reports module
| Status: | Closed | Start date: | 2011-05-13 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Ingo Renner | % Done: | 100% |
|
| Category: | Backend Modules | |||
| Target version: | 2.0 | |||
| TYPO3 Version: | Has patch: | |||
| PHP Version: | Tags: | |||
| Votes: | 0 |
Description
code in report_indexreport.php looks like this:
try {
$this->solr = $this->getSelectedSolrConnection($solrConnections);
$data = $this->solr->getLukeMetaData();
$content = $this->renderData($data);
} catch (Exception $e) {
$message = t3lib_div::makeInstance(
't3lib_FlashMessage',
'Solr server: ' . $this->solr->getScheme() . '://' . $this->solr->getHost() . ':' . $this->solr->getPort() . $this->solr->getPath(),
'Failed to establish Solr connection.',
t3lib_FlashMessage::ERROR,
TRUE
);
If $this->solr doesn't work, it is caught by the catch but then the report crashes again at $this->solr->getScheme() because the object isn't there. It makes no sense using try/catch if the object is used anyways ;)
Associated revisions
Fixed issue #26807: Bug in try/catch in reports module
Fixed issue #26807: Bug in try/catch in reports module
History
Updated by Georg Ringer about 2 years ago
to reproduce: don't add the TS of EXT:solr
Updated by Ingo Renner about 2 years ago
- Status changed from New to Resolved
- Assignee set to Ingo Renner
- Target version set to 860
- % Done changed from 0 to 100
Thanks, fixed in r48090
Updated by Ingo Renner almost 2 years ago
- Target version changed from 860 to 2.0
Updated by Ingo Renner about 1 year ago
- Status changed from Resolved to Closed