Don't report zero grep results as error
Test Plan: Grepped for non-existing string. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5776
This commit is contained in:
@@ -209,9 +209,12 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
}
|
||||
|
||||
} catch (CommandException $ex) {
|
||||
return id(new AphrontErrorView())
|
||||
->setTitle(pht('Search Error'))
|
||||
->appendChild($ex->getStderr());
|
||||
$stderr = $ex->getStderr();
|
||||
if ($stderr != '') {
|
||||
return id(new AphrontErrorView())
|
||||
->setTitle(pht('Search Error'))
|
||||
->appendChild($stderr);
|
||||
}
|
||||
}
|
||||
|
||||
$results = array_slice($results, $page);
|
||||
|
||||
Reference in New Issue
Block a user