1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Mark created Pholio mockups as new objects to fix empty Feed transaction entries

Summary:
When creating a Pholio mockup, `setIsCreateTransaction(true)` to avoid an empty `Transaction` field in the Feed and avoid `strncmp()` complaining about a null value being passed.

This is very similar to T15659 about Differential Diffs.

```
ERROR 8192: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/policy/query/PhabricatorPolicyQuery.php:314]
```

Closes T15679

Test Plan:
1. Create a new Pholio mockup via `/pholio/create/`
2. Go to `/feed/transactions/query/all/`
3. Compare entries in the `Transaction` column before (empty ones) and after (no empty ones) applying the patch.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15679

Differential Revision: https://we.phorge.it/D25600
This commit is contained in:
Andre Klapper 2024-04-19 18:29:26 +02:00
parent 29cbb0a658
commit aad704d0fc

View file

@ -108,6 +108,7 @@ final class PholioMockEditController extends PholioController {
foreach ($mock_xactions as $type => $value) { foreach ($mock_xactions as $type => $value) {
$xactions[$type] = id(new PholioTransaction()) $xactions[$type] = id(new PholioTransaction())
->setTransactionType($type) ->setTransactionType($type)
->setIsCreateTransaction($is_new)
->setNewValue($value); ->setNewValue($value);
} }