1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-03 18:38:27 +01:00
phorge-phorge/src/applications/metamta
Valerio Bozzolan d25d630fe5 PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1
Summary:
This change avoids some unnecessary uses of the strlen() function,
actually fixing some deprecation warnings in PHP 8.2.

In short, this is the suggested universal replace:

    -if(strlen($v))
    +if(phutil_nonempty_string($v))

And, if you know PHP, this is also another adoptable replace, but
only for cases where you are sure that the string "0" is not useful:

    -if(strlen($v))
    +if($v))

As usual the optimal solution depends on the contest.

Other similar patches will probably follow.

Closes T15222
Ref T15190

Test Plan:
- for the first time in my life, with this change, the unit tests are passed in PHP 8.2
- check with your big eyes that there are no obvious typos

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15199, T15190, T15222

Differential Revision: https://we.phorge.it/D25104
2023-03-31 22:05:52 +02:00
..
action Simplify implementation of "SysetemAction->getSystemActionConstant()" 2019-07-19 15:45:37 -07:00
adapter Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
application Support Postmark inbound mail via webhook 2018-02-08 06:25:26 -08:00
applicationpanel Remove product literal strings in "pht()", part 20 2022-04-25 16:46:25 -07:00
command Use PhutilClassMapQuery 2015-07-07 22:51:57 +10:00
constants Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
contentsource Modularize content sources 2016-03-26 11:59:45 -07:00
controller Remove product literal strings in "pht()", part 11 2022-04-25 16:46:24 -07:00
edge MetaMTA - more progress towards a mail application 2015-06-23 11:37:14 -07:00
editor Prevent application email addresses from shadowing user email addresses 2019-01-16 13:28:08 -08:00
engine PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1 2023-03-31 22:05:52 +02:00
engineextension Manage object mailKeys automatically in Mail instead of storing them on objects 2018-04-25 06:46:58 -07:00
exception PHP 8.2: fix deprecated use of "parent" in callables 2023-03-29 20:37:25 +02:00
future Update SES API to use AWSv4 signatures 2020-09-15 13:03:49 -07:00
garbagecollector Support DestructionEngine in MetaMTAMail 2018-02-02 14:37:33 -08:00
herald Prevent "Call webhooks" Herald action from appearing in UI for adapters which can't fire it 2018-02-11 06:15:29 -08:00
management Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
message Give "MetaMTAMail" a "message type" and support SMS 2019-01-23 14:05:46 -08:00
parser Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
receiver Remove product literal strings in "pht()", part 20 2022-04-25 16:46:25 -07:00
replyhandler Drop empty inbound mail at the beginning of the receive workflow, not inside object handlers 2019-01-04 13:50:21 -08:00
stamp Fix a mail stamp issue with blocking reviewers 2018-02-13 17:56:21 -08:00
storage Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
typeahead Fix packages(project) to work properly and add it to "MailableFunctionDatasource" 2018-10-19 13:53:27 -07:00
util Remove product literal strings in "pht()", part 6 2022-04-25 12:22:28 -07:00
view Rename "MetaMTA" mail attachments and add more mail message objects 2019-01-04 15:23:44 -08:00
PhabricatorMetaMTAWorker.php Send permanent dameon failures to the log, even when not running in verbose mode 2017-06-08 15:26:19 -07:00