Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in PhutilOpaqueEnvelope.php
ClosedPublic

Authored by aklapper on Apr 21 2023, 17:35.

Details

Summary

This change fixes a RuntimeException for passing null to strlen() when setting up the DB host parameter

Closes T15260

Test Plan

I was able to run "./bin/config set mysql.host "localhost"" successfully

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 22 2023, 06:18

Thanks for accepting. As I have been puzzled by arc for many years now, is there a way to merge via the web UI? arc land D25129 on a shell tells me that Branch "D25129" does not exist in the local working copy, likely because I've reset stuff here.

Thanks for accepting. As I have been puzzled by arc for many years now, is there a way to merge via the web UI? arc land D25129 on a shell tells me that Branch "D25129" does not exist in the local working copy, likely because I've reset stuff here.

There is no way to merge from the web UI.

You don't need to pass the differential revision ID to the command like you've done above: arc land D25129. This is wrong because the first argument to arc land is the branch you want to land changes from.

To land changes, run the command arc land on the branch with the accepted changes. If you no longer have the changes, you can run arc patch D25129 to download the changes to a new branch, and then run arc land on that branch.

goddenrich added inline comments.
src/error/PhutilOpaqueEnvelope.php
62–71

I think early returns are much nicer

src/error/PhutilOpaqueEnvelope.php
62–71

sorry

if (!phutil_nonempty_string($string))

which makes me think we might want a phutil_isempty_string() so we aren't double negativing all over the place

In D25129#4130, @Dylsss wrote:

Thanks for accepting. As I have been puzzled by arc for many years now, is there a way to merge via the web UI? arc land D25129 on a shell tells me that Branch "D25129" does not exist in the local working copy, likely because I've reset stuff here.

There is no way to merge from the web UI.

Just for a point of clarification, Phorge can be configured to support landing revisions from the Web UI https://we.phorge.it/book/phorge/article/differential_land/

Whether or not we want to enable this for this Phorge install might be a separate discussion, but, this capability does exist

[OT]

In D25129#4130, @Dylsss wrote:

If you no longer have the changes, you can run arc patch D25129 to download the changes to a new branch, and then run arc land on that branch.

Thanks. :) However in practice I repeatedly get a 403.

Screenshot_20230425_101356-phorge-arc-fail.png (1×1 px, 147 KB)

Thanks. :) However in practice I repeatedly get a 403.

Screenshot_20230425_101356-phorge-arc-fail.png (1×1 px, 147 KB)

Sorry but at the moment it seems we have not enabled git authentication over HTTP.

I have this workaround for you:

  1. add your public SSH key here: https://we.phorge.it/settings/user/aklapper/page/ssh/
  2. set your git origin to ssh://git@we.phorge.it/source/arcanist.git
  3. try again

Thank you so much

@valerio.bozzolan: Thank you for your patience with me! :)

@valerio.bozzolan: Thank you for your patience with me! :)

ihih thank you for your patience with our beloved and dear brand-new Phorge instance :D