Homestyx hydra
Diffusion hydra 7af82abcb908

PHP 8.1 "strlen(null)" exception on SVN History page after changing "Import…

Description

PHP 8.1 "strlen(null)" exception on SVN History page after changing "Import Only"

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=b325304b6e52), phorge(head=master, ref.master=cb938d869c3f)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/repository/xaction/PhabricatorRepositorySVNSubpathTransaction.php:25]

Closes T15445

Test Plan: After applying this change, and after setting some "Import Only" value for a new Subversion repository, the page /diffusion/1/manage/history/ renders showing R1 being Inactive and user set the repository "Import Only" path to main.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

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

Maniphest Tasks: T15445

Differential Revision: https://we.phorge.it/D25277

Details

Provenance
Andre KlapperAuthored on Jun 8 2023, 8:53 AM
sirocylPushed on Oct 16 2024, 5:49 AM
Parents
R1:b09471d55748: Fix PHP 8.1 "strlen(null)" exceptions creating a Diffusion Identity without…
Branches
Unknown
Tags
Unknown

Event Timeline