Page MenuHomePhabricator

Error creating Milestone: Argument passed must be array, string given, called in /PhabricatorPHIDListEditField.php:58
Closed, ResolvedPublic

Description

Steps to Reproduce

  1. Navigate to a Project's subproject page (example)
  2. Click Create Next Milestone
  3. Enter a Name, e.g., "No Further Action"
  4. click Create New Project

Actual Result
Error message: Argument 1 passed to head() must be of the type array, string given, called in /srv/deployment/phabricator/deployment-cache/revs/7dd45143c333b8fb854b8f40bd96c46ea56a0970/phabricator/src/applications/transactions/editfield/PhabricatorPHIDListEditField.php on line 58 and defined
No milestone created

Expected Result
Milestone created, no error.

Event Timeline

Restricted Application added subscribers: TerraCodes, Aklapper. · View Herald TranscriptNov 17 2016, 9:50 PM

From the error log when testing it on phab-01 on https://phab-01.wmflabs.org/project/edit/?milestone=15

1[Thu Nov 17 21:58:10.036004 2016] [:error] [pid 29884] [client 10.68.21.68:36682] [2016-11-17 21:58:10] ERROR 2: array_slice() expects parameter 1 to be array, string given at [/srv/phab/phabricator/src/applications/transactions/editfield/PhabricatorPHIDListEditField.php:48]
2[Thu Nov 17 21:58:10.036605 2016] [:error] [pid 29884] [client 10.68.21.68:36682] arcanist(), phabricator(), phutil(), sprint(), wmf-ext-misc(head=wmf/stable, ref.master=b9ef898b41d5, ref.wmf/stable=c857867635cc)
3[Thu Nov 17 21:58:10.036620 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #0 array_slice(string, integer, integer) called at [<phabricator>/src/applications/transactions/editfield/PhabricatorPHIDListEditField.php:48]
4[Thu Nov 17 21:58:10.036624 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #1 PhabricatorPHIDListEditField::getValueFromRequest(AphrontRequest, string) called at [<phabricator>/src/applications/transactions/editfield/PhabricatorEditField.php:445]
5[Thu Nov 17 21:58:10.036627 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #2 PhabricatorEditField::readValueFromRequest(AphrontRequest) called at [<phabricator>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1057]
6[Thu Nov 17 21:58:10.036629 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #3 PhabricatorEditEngine::buildEditResponse(PhabricatorProject) called at [<phabricator>/src/applications/transactions/editengine/PhabricatorEditEngine.php:896]
7[Thu Nov 17 21:58:10.036632 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #4 PhabricatorEditEngine::buildResponse() called at [<phabricator>/src/applications/project/controller/PhabricatorProjectEditController.php:91]
8[Thu Nov 17 21:58:10.036635 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #5 PhabricatorProjectEditController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:257]
9[Thu Nov 17 21:58:10.036637 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:169]
10[Thu Nov 17 21:58:10.036640 2016] [:error] [pid 29884] [client 10.68.21.68:36682] #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]

Aklapper renamed this task from Error creating Milestone to Error creating Milestone: Argument passed must be array, string given, called in /PhabricatorPHIDListEditField.php:58.Nov 17 2016, 10:00 PM
Aklapper triaged this task as High priority.
Aklapper added a subscriber: mmodell.

when trying to create a test one, I get this error too

1Argument 1 passed to head() must be of the type array, string given, called in /srv/phab/phabricator/src/applications/transactions/editfield/PhabricatorPHIDListEditField.php on line 58 and defined
2
3
4
58 phutil utils/utils.php : 761 PhutilErrorHandler::handleError()
67 phabricator applications/transactions/editfield/PhabricatorPHIDListEditField.php : 58 head()
76 phabricator applications/transactions/editengine/PhabricatorEditEngine.php : 974 PhabricatorPHIDListEditField::getValueForTransaction()
85 phabricator applications/transactions/editengine/PhabricatorEditEngine.php : 896 PhabricatorEditEngine::buildEditResponse()
94 phabricator applications/project/controller/PhabricatorProjectEditController.php : 91 PhabricatorEditEngine::buildResponse()
103 phabricator aphront/configuration/AphrontApplicationConfiguration.php : 257 PhabricatorProjectEditController::handleRequest()
112 phabricator aphront/configuration/AphrontApplicationConfiguration.php : 169 AphrontApplicationConfiguration::processRequest()
121 /srv/phab/phabricator/webroot/index.php : 17 AphrontApplicationConfiguration::runHTTPRequest()

Paladox edited projects, added Phabricator (Upstream); removed Phabricator.EditedNov 17 2016, 10:25 PM

This should be filled upstream please?

Restricted Application added a project: Upstream. · View Herald TranscriptNov 17 2016, 10:25 PM
Restricted Application added a project: Upstream. · View Herald TranscriptNov 18 2016, 8:31 AM

Mentioned in SAL (#wikimedia-operations) [2016-11-18T14:19:33Z] <twentyafterfour> phabricator: deploying more fixes from upstream/stable to wmf/stable. Fixes T150992

mmodell closed this task as Resolved.Nov 18 2016, 2:21 PM
mmodell claimed this task.
mmodell moved this task from Backlog to Solved upstream on the Phabricator (Upstream) board.

fixed as of rPHABa081a85