Created attachment 207953 [details]
utils/utils.php: patch to fix call oder
Running arc on a newer version of PHP (i.e. 7.4) throws a lot of exceptions. This is currently a cosmetic issue, but will cause real errors in the future.
[2019-09-30 07:00:39] ERROR 8192: implode(): Passing glue string after array is deprecated. Swap the parameters at [/usr/local/lib/php/libphutil/src/utils/utils.php:1706]
#0 implode(array, string) called at [<phutil>/src/utils/utils.php:1706]
#1 phutil_build_http_querystring_from_pairs(array) called at [<phutil>/src/utils/utils.php:1678]
#2 phutil_build_http_querystring(array) called at [<phutil>/src/future/http/HTTPSFuture.php:656]
#3 HTTPSFuture::formatRequestDataForCURL() called at [<phutil>/src/future/http/HTTPSFuture.php:280]
#4 HTTPSFuture::isReady() called at [<phutil>/src/future/Future.php:37]
#5 Future::resolve(NULL) called at [<phutil>/src/future/FutureProxy.php:34]
#6 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64]
#7 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:518]
#8 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
The documentation in https://www.php.net/manual/en/function.implode.php says:
implode ( string $glue , array $pieces ) : string
Note: implode() can, for historical reasons, accept its parameters
in either order. For consistency with explode(), however, it may
be less confusing to use the documented order of arguments.
Thank you for the report and patch
Have you searched upstream for issues, commits or patches for this?
(In reply to Kubilay Kocak from comment #1)
Yes, I did search the bug tracker of phabricator (but I do not have an account). There was nothing. I'd assume, that most people stick to older versions of PHP.
I did not check the HEAD of the arcanist source.
A commit references this bug:
Date: Mon Sep 30 09:12:54 UTC 2019
New revision: 513334
Fix use of implode() to avoid warnings when running on newer versions
See also https://www.php.net/manual/en/function.implode.php
Committed with minor changes.
Submitted by: email@example.com
Thanks for the contribution.
I committed the patch to devel/libphutil with small changes and also opened a pull request upstream:
@koobs Merging to quarterly won't be necessary, as 2019Q4 will be branched this week (probably tomorrow).
Upstream doesn't accept pull requests and getting access to upstream phabricator is limited to few individuals, therefore I opened a report in their forums, let's see if that leads to anything:
Committed upstream in https://secure.phabricator.com/D20846