mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Raise a tailored error message on "show-outbound --id cat"
Summary: Fixes T12579. Unclear why the user ran this command. Test Plan: Ran with `--id cat`. Ran with `--id 123`. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12579 Differential Revision: https://secure.phabricator.com/D17719
This commit is contained in:
parent
b54adc6161
commit
8377bb3637
1 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,15 @@ final class PhabricatorMailManagementShowOutboundWorkflow
|
|||
'--id'));
|
||||
}
|
||||
|
||||
foreach ($ids as $id) {
|
||||
if (!ctype_digit($id)) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht(
|
||||
'Argument "%s" is not a valid message ID.',
|
||||
$id));
|
||||
}
|
||||
}
|
||||
|
||||
$messages = id(new PhabricatorMetaMTAMail())->loadAllWhere(
|
||||
'id IN (%Ld)',
|
||||
$ids);
|
||||
|
|
Loading…
Reference in a new issue