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/passphrase
Andre Klapper 10ee019785 Fix PHP 8.1 "strlen(null)" exception setting Passphrase Credential
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.

```
EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=788098096e11), phorge(head=master, ref.master=840a7fab2bc8)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/passphrase/view/PassphraseCredentialControl.php:53]
```

Closes T15580

Test Plan: Set URI for a Diffusion Repository, select URI and select "Set Credential". Page "Edit Repository URI" at `/diffusion/123/uri/edit/456/` renders as expected in web browser.

Reviewers: O1 Blessed Committers, Matthew

Reviewed By: O1 Blessed Committers, Matthew

Subscribers: avivey, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15580

Differential Revision: https://we.phorge.it/D25370
2023-08-11 20:56:49 +02:00
..
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
capability Save authorPHID on Passphrase Credentials to support "Credential Author" object policy 2015-06-22 11:28:33 -07:00
conduit Make Passphrase "token" credentials accessible via the API 2016-11-15 09:12:35 -08:00
controller Allow to prefill name and description fields of a new Passphrase 2023-02-11 11:08:12 +01:00
credentialtype Correctly identify more SSH private key problems as "formatting" or "passphrase" related 2019-11-13 10:22:00 -08:00
editor Update Passphrase for modular transactions 2017-05-04 11:31:37 -07:00
keys Add a "Token" Credential type 2016-03-22 12:11:58 -07:00
phid Separate handle "status" and "availability" 2015-05-14 11:14:44 -07:00
policyrule Save authorPHID on Passphrase Credentials to support "Credential Author" object policy 2015-06-22 11:28:33 -07:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
search Reduce the amount of boilerplate that implementing FerretInterface requires 2017-09-07 13:23:31 -07:00
storage Update PassphraseCredential to support Mentions 2022-10-09 03:30:07 -07:00
view Fix PHP 8.1 "strlen(null)" exception setting Passphrase Credential 2023-08-11 20:56:49 +02:00
xaction Replace "Show Secret" in Passphrase with one-shot MFA 2019-01-28 09:44:08 -08:00