1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 05:41:01 +01:00
phorge-phorge/src/applications/notification
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
..
application Complete modernization of Aphlict configuration 2016-04-14 04:57:00 -07:00
builder Remove obsolete "NotifyTest" feed story 2018-12-10 16:03:42 -08:00
client PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1 2023-03-31 22:05:52 +02:00
config Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
controller Add "Move Left" and "Move Right" to dashboard tab panels 2019-05-01 15:35:53 -07:00
engineextension Fully modularize DestructionEngine 2015-12-21 17:03:44 -08:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
query Fix a followup notification paging error with partial objects 2021-03-12 09:09:45 -08:00
setup Remove product literal strings in "pht()", part 21 2022-04-25 16:46:26 -07:00
storage Cache user notification and message counts 2016-06-05 08:52:43 -07:00
view Add an icon to aphlict connection status 2016-10-02 08:17:21 -07:00