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) {
|
} catch (CommandException $ex) {
|
||||||
|
$stderr = $ex->getStderr();
|
||||||
|
if ($stderr != '') {
|
||||||
return id(new AphrontErrorView())
|
return id(new AphrontErrorView())
|
||||||
->setTitle(pht('Search Error'))
|
->setTitle(pht('Search Error'))
|
||||||
->appendChild($ex->getStderr());
|
->appendChild($stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = array_slice($results, $page);
|
$results = array_slice($results, $page);
|
||||||
|
|||||||
Reference in New Issue
Block a user