Page MenuHomePhabricator

./bin/mail show-outbound command should type check <id>
Closed, ResolvedPublic

Description

To reproduce:
./bin/mail show-outbound --id cat@dog.com


Stack Trace:

[2017-04-18 05:37:59] EXCEPTION: (AphrontParameterQueryException) Expected a numeric scalar or null for %Ld conversion. Query: SELECT * FROM %s WHERE id IN (%Ld) %Q at [<phutil>/src/xsprintf/qsprintf.php:294]
arcanist(head=master, ref.master=a59cfca5f190), phabricator(head=master, ref.master=a56f9a1a5599), phutil(head=master, ref.master=6fe33623cda6)

#0 qsprintf_check_scalar_type(string, string, string) called at [<phutil>/src/xsprintf/qsprintf.php:267]
#1 qsprintf_check_type(array, string, string) called at [<phutil>/src/xsprintf/qsprintf.php:134]
#2 xsprintf_query(AphrontMySQLiDatabaseConnection, string, integer, array, integer) called at [<phutil>/src/xsprintf/xsprintf.php:70]
#3 xsprintf(string, AphrontMySQLiDatabaseConnection, array) called at [<phutil>/src/xsprintf/qsprintf.php:64]
#4 qsprintf(AphrontMySQLiDatabaseConnection, string, string, array, string) called at [<phutil>/src/xsprintf/queryfx.php:5]
#5 queryfx(AphrontMySQLiDatabaseConnection, string, string, array, string) called at [<phutil>/src/xsprintf/queryfx.php:13]
#6 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, array, string) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:52]
#7 AphrontDatabaseConnection::queryData(string, string, array, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:535]
#8 LiskDAO::loadRawDataWhere(string, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:476]
#9 LiskDAO::loadAllWhere(string, array) called at [<phabricator>/src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php:41]
#10 PhabricatorMailManagementShowOutboundWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:441]
#11 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:333]
#12 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/mail/manage_mail.php:21]

Event Timeline

Please provide complete steps to reproduce the error. Based on the information above I cannot reproduce anything.

i am trying this command
./bin/mail show-outbound --id <my-email-id>

chad@phac-dev:/var/www/html/dev/phabricator$ ./bin/mail show-outbound --id 1
PROPERTIES
ID: 1
Status: sent
Related PHID: PHID-USER-hh5jvrt4dfkdzciswub6
Message:

It should give me warning if i am using string value for my id part.

chad claimed this task.
chad edited projects, added Contributor Onboarding; removed Bug Report.

Actually I'll leave this open if someone wants to contribute a patch.

chad renamed this task from Error while using ./bin/mail show-outbound command to ./bin/mail show-outbound command should type check <id>.Apr 18 2017, 5:50 AM
chad removed chad as the assignee of this task.
chad updated the task description. (Show Details)