1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00
phorge-phorge/src/applications
Andre Klapper 58f1c83a5a Fix PHP 8.1 "strlen(null)" exception in DivinerFindController
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.

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/diviner/controller/DivinerFindController.php:40]
```

Closes T15910

Test Plan:
Go to this (or any other Diviner Find URL not passing a `type` URI parameter): now it works:

http://phorge.localhost/diviner/find/?name=PhutilSafeHTML

Go to this (or any other Diviner Find URL passing a `type` URI parameter): it still works:

http://phorge.localhost/diviner/find/?name=PhutilSafeHTML&type=class

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15910

Differential Revision: https://we.phorge.it/D25768
2024-08-11 22:36:44 +02:00
..
almanac Drydock and Almanac: add welcome pages 2024-06-25 09:37:01 +02:00
aphlict Fix PHP 8.1 "strlen(null)" exception for "/bin/aphlict notify" without parameter 2024-04-17 13:11:07 +02:00
arcanist/conduit
audit Allow to uninstall (hide) Audit application 2024-02-12 12:10:06 +01:00
auth Fix PHP 8.1 "strlen(null)" exception in PhabricatorAuthAccountView 2024-08-02 21:26:58 +02:00
badges Disallow awarding a badge without selecting recipient 2024-07-30 10:50:28 +02:00
base Remove deprecated buildStandardPage* method calls 2024-05-16 08:39:08 +02:00
cache Fix various "strlen(null)" PHP 8.1 issues on "bin/phd" and "bin/drydock" pathways 2022-05-03 15:57:15 -07:00
calendar Fix PHP 8.1 exceptions importing ICS file without attendee names 2024-06-11 00:54:38 +02:00
celerity Initialize $cache_key variable in CelerityResourceController.php 2024-06-11 13:54:58 +02:00
conduit Fix PHP 8.1 "strlen(null)" exception for "/bin/conduit call" without parameter 2024-04-17 13:07:30 +02:00
config Add Open Graph protocol meta tags to Maniphest task pages 2024-08-07 13:54:11 +02:00
conpherence Fix missing file attachment in Conpherence 2024-07-05 18:20:40 +02:00
console log deprecation events in Dark Console 2023-08-31 08:18:28 -07:00
countdown Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
daemon Remove unused parameter from PhabricatorDaemonController::buildSideNavView() call 2024-07-26 13:48:44 +02:00
dashboard Fix call to non-existing newEmptyValue() in PhabricatorDashboardPortalProfileMenuEngine 2024-06-24 08:56:02 +02:00
differential Add Copy file path button to file header bar in Differential/Diffusion 2024-08-04 11:53:24 +02:00
diffusion fix PHP8 array_slice($results, null) which cause diffusion pattern search broken 2024-07-31 09:51:18 +08:00
diviner Fix PHP 8.1 "strlen(null)" exception in DivinerFindController 2024-08-11 22:36:44 +02:00
doorkeeper Remove call to undefined method DoorkeeperDAO::getObjectKey() 2024-07-22 17:28:00 +02:00
draft/storage Save drafts for inline comments currently being edited 2020-05-04 13:19:42 -07:00
drydock Fix property name typo in DrydockResource 2024-07-07 15:52:42 +02:00
fact Suppress PHP 8.1 warnings "Return type mixed is not covariant with tentative return type mixed of method Iterator::key()" 2024-08-02 11:44:25 +02:00
favorites Make "Favorites" work more like other customizable menus 2019-04-09 13:59:35 -07:00
feed Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
files Destroy file attachments when file is deleted, or object is deleted 2024-08-10 22:16:53 +02:00
flag Add (Advanced) Custom Fields to Item List 2024-05-11 13:25:41 +03:00
fund Deprecate Fund and Phortune prototype applications 2024-02-06 09:16:19 +01:00
guides Remove product literal strings in "pht()", part 5 2022-04-25 12:22:27 -07:00
harbormaster Suppress PHP 8.1 warnings "Return type mixed is not covariant with tentative return type mixed of method Iterator::key()" 2024-08-02 11:44:25 +02:00
help Tokenize external editor links so they can be safely materialized on the client 2020-04-19 09:02:49 -07:00
herald Log Herald rules with invalid actions via phlog() 2024-08-04 11:35:55 +02:00
home Fix PHP 8.1 "strlen(null)" exception which blocks rendering the Home page 2023-05-01 15:37:56 +02:00
legalpad Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
maniphest Fix PHP 8.1 "strlen(null)" exception in ManiphestTaskPointsTransaction 2024-08-07 13:57:07 +02:00
meta Fix important regression in search engine 2024-03-26 07:30:10 +01:00
metamta Remove unused parameter from PhabricatorMailEmailEngine::newEmailThreadingHeaders() call 2024-07-26 12:06:42 +02:00
multimeter Fix PHP 8.1 "explode(null)" exception which blocks rendering the Multimeter page 2023-05-29 12:35:54 +02:00
notification Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
nuance Fix call to non-existing newWorkCommands() in NuanceItemType 2024-06-07 13:30:49 +02:00
oauthserver Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
owners Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
packages Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
passphrase Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
paste Fix PHP 8.1 "strlen(null)" exception in PhabricatorPasteLanguageTransaction.php 2024-05-02 10:28:08 +02:00
people Remove unused save() method in PhabricatorUserCache 2024-07-02 12:12:43 +02:00
phame Correct PHPDoc or add default return for numerous methods 2024-05-18 21:54:51 +02:00
phid Correct docs of PhabricatorPHIDType::getAllTypesForApplication() 2024-04-08 13:14:01 +02:00
phlux Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
pholio Warn in comment field if task is closed as duplicate 2024-06-23 15:29:17 +02:00
phortune Fix property name typo in PhabricatorPDFIterator 2024-07-12 12:20:19 +02:00
phpast Remove deprecated buildStandardPage* method calls 2024-05-16 08:39:08 +02:00
phrequent Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
phriction Fix missing file attachment in Phriction 2024-07-01 18:41:55 +02:00
phurl Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
policy Fix the whitespace issue in the message "Access Denied: Restricted File" 2024-05-05 14:00:26 +03:00
ponder Warn in comment field if task is closed as duplicate 2024-06-23 15:29:17 +02:00
project Removed unused renderStatus() from PhabricatorProjectSubprojectsController 2024-07-20 11:55:31 +02:00
reference/src Make the Remarkup Help Page Extensible 2024-06-26 22:11:44 +02:00
remarkup Generate file attachment transactions for explicit Remarkup attachments on common edit pathways 2022-05-19 13:21:04 -07:00
repository Removed unused loadGitLocalRefs() from PhabricatorRepositoryPullEngine 2024-07-15 08:28:20 +02:00
search Removed unused validateNavigationMenuItem() from PhabricatorProfileMenuEngine 2024-07-10 13:32:53 +02:00
settings Fix invalid logic in PhabricatorEmailPreferencesSettingsPanel::processRequest() 2024-07-10 08:38:33 +02:00
slowvote Warn in comment field if task is closed as duplicate 2024-06-23 15:29:17 +02:00
spaces Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
subscriptions Avoid PhabricatorApplicationTransactionStructureException on editors not supporting Mute Notifications 2024-07-30 10:52:07 +02:00
support/application
system Show Deprecation Warnings as Setup Warnings 2023-12-08 17:55:18 +02:00
tokens Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
transactions Do not add actor as subscriber when removing a comment 2024-08-04 11:30:03 +02:00
typeahead Show login page if a search token requires a valid viewer 2024-06-04 16:10:50 +02:00
uiexample Implements copy button in clone repo modal 2024-02-15 19:38:39 +01:00
xhprof Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00