phorge/src/applications/files/conduit
Christopher Speck f6214f060e Addressing some PHP 8 incompatibilities
Summary:
Starting with a new instance running PHP 8.2, address all exceptions that come up through some basic browsing/usage.

For `strlen(null)` issues I generally tried to resolve if the value should be non-null at the point of issue, and attempt to address at earlier call-site. There were not many of these that I could determine. In the rest of those cases I would replace with a null-and-strlen check, or use `phutil_nonempty_string` if I was certain the value was a string and it was more convenient.

Hitting all code-paths is challenging, so I would search for `strlen` within radius of files I was modifying and evaluate to address those uses in the same manner.

Notes:
- `AphrontRequest::getStr` only ever returns a string, and is safe to use `phutil_nonempty_string`.
- `PhabricatorEnv::getEnvConfig` can return non-string things so any values coming from there should never use `phutil_nonempty_string`.
- `AphrontRequest::getHTTPHeader` indicates it could return wild so `phutil_nonempty_string` should not be used.
- `AphrontRequest::getURIData` isn't clear if it could return non-string data, so never use `phutil_nonempty_string`.

Refs T13588

Test Plan: I'm running an instance on 8.2 and went through the basic setup/installation, startup and usage, including setup issues and configurations/settings.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: aklapper, Korvin, epriestley

Maniphest Tasks: T13588

Differential Revision: https://secure.phabricator.com/D21862
2023-05-24 17:10:12 -04:00
..
FileAllocateConduitAPIMethod.php Addressing some PHP 8 incompatibilities 2023-05-24 17:10:12 -04:00
FileConduitAPIMethod.php
FileDownloadConduitAPIMethod.php
FileInfoConduitAPIMethod.php Provide a modern ("v3") API for querying files ("file.search") 2017-04-04 16:15:36 -07:00
FileQueryChunksConduitAPIMethod.php
FileUploadChunkConduitAPIMethod.php Stop trying to assess the image dimensions of large files and file chunks 2017-12-18 09:17:32 -08:00
FileUploadConduitAPIMethod.php Remove SHA1 file content hashing and make Files work without any hashing 2017-04-04 16:22:10 -07:00
FileUploadHashConduitAPIMethod.php Deprecate "file.uploadhash" 2017-04-04 16:18:26 -07:00
PhabricatorFileSearchConduitAPIMethod.php Provide a modern ("v3") API for querying files ("file.search") 2017-04-04 16:15:36 -07:00