1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-13 21:05:02 +01:00
phorge-phorge/src/applications/differential
Steve Campbell b3ac5ceb38 Fix DifferentialGetCommitMessageConduitAPIMethod execute strlen(null)
Summary:
When iterating through the fields of a differential commit, the DifferentialGetCommitMessageConduitAPIMethod execute method explicitly allows a value to be either a string or a null. It then calls strlen upon this possibly null value.

We could replace the strlen with phutil_nonempty_string, but as the code has already eliminated variable types other than string or null, it is more efficient to explicitly check for null or ''
```
$value === null or $value == ''
```

Fixes T15527

Test Plan:
Run
```
arc diff
```

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15527

Differential Revision: https://we.phorge.it/D25332
2023-07-06 09:42:20 +01:00
..
__tests__ Make "Highlight As..." sticky across reloads in Diffusion and Differential 2020-04-19 08:58:39 -07:00
application Add a debug view of the "Affected Path" index to Differential 2021-03-15 16:16:09 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
command Fix another stray "msort()/msortv()" issue 2019-06-17 13:20:10 -07:00
conduit Fix DifferentialGetCommitMessageConduitAPIMethod execute strlen(null) 2023-07-06 09:42:20 +01:00
config Remove product literal strings in "pht()", part 17 2022-04-25 16:46:25 -07:00
constants Replace Differential "lint stars" with icons 2021-03-17 13:45:52 -07:00
controller Remove product literal strings in "pht()", part 17 2022-04-25 16:46:25 -07:00
customfield Fix PHP 8.1 DifferentialBranchField getBranchDescription strlen(null) error 2023-07-05 16:06:26 +01:00
doorkeeper Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
edge Update parent/child revision timeline messages to use modern language ("parent revision") 2018-07-13 09:02:10 -07:00
editor Fix PHP 8.1 "preg_match(null)" exception on "Create Revision" page in Differential when not entering data 2023-06-08 14:48:45 +02:00
engine Update table schema for "AffectedPath" table 2021-03-15 16:16:10 -07:00
engineextension Add a "commits" attachment to "differential.diff.search" for retrieving local commit information 2018-04-19 17:25:06 -07:00
exception Remove an unused class 2015-01-03 09:07:32 +11:00
field Move misplaced validation for ambiguous fields in "Test Plan" to the right place 2017-06-30 06:36:05 -07:00
garbagecollector Add a very forgiving GC for Differential viewstate information 2020-04-23 14:17:48 -07:00
harbormaster Don't try to publish build results to bare diffs 2019-02-13 12:19:29 -08:00
herald Implement an "Author's packages" Herald field for Differential 2020-01-22 18:27:51 -08:00
lipsum Fix deprecated argument order for "implode()" 2019-10-17 09:11:27 -07:00
mail Update out-of-date API calls when rendering diffs inline in email 2020-05-19 10:39:58 -07:00
management Fix additional "xprintf()"-class static parameter lint errors 2020-09-08 11:45:48 -07:00
parser Remove product literal strings in "pht()", part 5 2022-04-25 12:22:27 -07:00
phid Add a PHID to Changesets 2021-02-15 11:11:12 -08:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
render Remove product literal strings in "pht()", part 5 2022-04-25 12:22:27 -07:00
search Remove Ferret function aliases and overrides 2020-04-16 13:40:17 -07:00
storage Remove product literal strings in "pht()", part 5 2022-04-25 12:22:27 -07:00
typeahead Support "none()" in Differential to find revisions with no (un-resigned) reviewers 2019-05-21 12:56:59 -07:00
view Correct minor "jump to symbol" behavior in Differential 2021-03-17 15:32:07 -07:00
xaction Correct two spelling mistakes in Differential 2023-05-30 10:46:10 +02:00
DifferentialGetWorkingCopy.php Extend from Phobject 2015-06-15 18:02:27 +10:00