1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 03:32:42 +01:00
phorge-phorge/src/applications/conduit
Andre Klapper d630f2281b Fix PHP 8.1 "strlen(null)" exception for "/bin/conduit call" without parameter
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

This patch also fixes two similar `strlen()` occurrences in the same source file.

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/conduit/management/PhabricatorConduitCallManagementWorkflow.php:44]
```

Test Plan: Run `../phorge/bin/conduit call`: Get no `strlen()` error anymore but only expected output `Usage Exception: Specify a method to call with "--method".`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25584
2024-04-17 13:07:30 +02:00
..
application Allow Conduit method call logs to be exported with the standard export pipeline 2019-01-18 20:09:57 -08:00
call Conduit accept int/bool parameters as strings 2016-10-14 14:45:57 +00:00
controller Fix arc patch PHP 8.1 strlen(null) error 2023-07-29 17:36:13 +01:00
data Add a side nav to Conduit API method console pages 2021-07-21 14:16:59 -07:00
garbagecollector Remove all references to the Conduit ConnectionLog 2015-12-14 15:25:11 -08:00
interface Formalize custom Conduit fields on objects 2015-12-14 11:54:13 -08:00
management Fix PHP 8.1 "strlen(null)" exception for "/bin/conduit call" without parameter 2024-04-17 13:07:30 +02:00
method Remove product literal strings in "pht()", part 14 2022-04-25 16:46:24 -07:00
parametertype Make Conduit "www-form-urlencoded" parsing of "true" and "false" case-insensitive 2020-04-27 13:28:47 -07:00
protocol Make sure offset is an integer 2024-04-12 19:28:16 +03:00
query Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
settings Add icons to Settings 2019-01-23 13:41:41 -08:00
ssh Use phutil_microseconds_since(...) to simplify some timing arithmetic 2018-11-08 16:46:32 -08:00
storage Use futures to improve clustered repository main page performance 2016-12-08 07:26:32 -08:00