1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

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:
Jakub Vrana 2013-04-24 17:10:39 -07:00
parent 1c507f14af
commit f302751a23

View file

@ -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);