1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-12 14:58:33 +01:00
phorge-phorge/src/applications/repository/storage
Andre Klapper 7b57ba2b98 Fix PHP 8.1 "strlen(null)" exception initializing Diffusion repository without path access permissions
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.

Closes T15459

Test Plan: After applying this change, going to `/diffusion/17/manage/`, the actual error (`cannot mkdir /var/repo/17: Permission denied`) is propagated and displayed in the "Working Copy Status" section, instead of being hidden by a `strlen()` exception. See T15459 for details.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

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

Maniphest Tasks: T15459

Differential Revision: https://we.phorge.it/D25283
2023-06-10 22:59:57 +02:00
..
__tests__ Update templates used with mercurial to remove '--debug' 2021-07-09 12:35:20 -04:00
PhabricatorRepository.php Fix PHP 8.1 "strlen(null)" exception initializing Diffusion repository without path access permissions 2023-06-10 22:59:57 +02:00
PhabricatorRepositoryAuditRequest.php Modernize and clean up "PhabricatorAuditStatusConstants" 2021-03-10 09:21:55 -08:00
PhabricatorRepositoryBranch.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhabricatorRepositoryCommit.php Remove product literal strings in "pht()", part 8 2022-04-25 12:22:29 -07:00
PhabricatorRepositoryCommitData.php Make "CommitData" wrap and persist a "CommitRef" record 2020-09-15 17:36:40 -07:00
PhabricatorRepositoryCommitHint.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhabricatorRepositoryDAO.php Delete license headers from files 2012-11-05 11:16:51 -08:00
PhabricatorRepositoryGitLFSRef.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhabricatorRepositoryIdentity.php Distinguish between "Assigned" and "Effective" identity PHIDs more clearly and consistently 2019-11-19 09:37:44 -08:00
PhabricatorRepositoryIdentityTransaction.php Add controllers/search/edit engine functionality to RepositoryIdentity 2018-05-31 07:03:25 -07:00
PhabricatorRepositoryMirror.php Cut mirroring over to new URIs 2016-05-04 16:16:16 -07:00
PhabricatorRepositoryOldRef.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
PhabricatorRepositoryPullEvent.php Make minor correctness and display improvements to pull logs 2018-01-23 14:13:18 -08:00
PhabricatorRepositoryPushEvent.php Allow maintenance scripts to write synthetic events to the push log that act as repository updates 2021-06-01 08:29:54 -07:00
PhabricatorRepositoryPushLog.php Allow maintenance scripts to write synthetic events to the push log that act as repository updates 2021-06-01 08:29:54 -07:00
PhabricatorRepositoryRefCursor.php Separate "shouldPublishRef()" from "isPermanentRef()" and set "IMPORTED_PERMANENT" more narrowly 2021-01-22 19:51:38 -08:00
PhabricatorRepositoryRefPosition.php Add a RefPosition table to hold branch/tag positions once the RefCursor table is split 2017-09-15 10:19:17 -07:00
PhabricatorRepositorySchemaSpec.php Migrate the "badcommit" table to use the less-hacky "hint" mechanism 2016-08-24 09:32:59 -07:00
PhabricatorRepositoryStatusMessage.php When repositories hit pull errors, stop updating them as frequently 2016-09-19 17:29:56 -07:00
PhabricatorRepositorySymbol.php Framework for external symbol search 2015-05-31 07:37:06 -07:00
PhabricatorRepositorySyncEvent.php Add a basic web UI for intracluster sync logs 2018-11-10 04:58:36 -08:00
PhabricatorRepositoryTransaction.php Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
PhabricatorRepositoryURI.php Fix PHP 8.1 "strlen(null)" exception setting a Diffusion repo URI when diffusion.ssh-host is null 2023-06-08 10:30:08 +02:00
PhabricatorRepositoryURIIndex.php Unify intracluster sync and Drydock working copy construction timeouts as a repository "copy time limit" 2018-11-16 13:08:12 -08:00
PhabricatorRepositoryURITransaction.php Fill in new URI credential edit web UI interfaces 2016-05-02 04:26:13 -07:00
PhabricatorRepositoryWorkingCopyVersion.php Parameterize the repository read and write locks 2018-09-24 15:14:28 -07:00