Page MenuHomePhorge

fix strlen in PhabricatorMailManagementShowOutboundWorkflow
ClosedPublic

Authored by avivey on Jun 3 2023, 16:30.
Referenced Files
F2191467: D25275.1715774674.diff
Tue, May 14, 12:04
Unknown Object (File)
Sat, May 11, 00:56
Unknown Object (File)
Sat, May 11, 00:56
Unknown Object (File)
Fri, May 10, 18:19
Unknown Object (File)
Fri, May 10, 18:18
Unknown Object (File)
Fri, May 10, 13:19
Unknown Object (File)
Wed, May 8, 11:58
Unknown Object (File)
Wed, May 8, 11:23

Details

Summary

Ref T15064

Test Plan

run ./bin/mail show-outbound --id 1 on a non-html email with php 8.1, no crash.

Diff Detail

Repository
rP Phorge
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 509
Build 509: arc lint + arc unit

Event Timeline

avivey requested review of this revision.Jun 3 2023, 16:30

Nice

Followed the test plan.

Maybe we can add a small PHPDoc in PhabricatorMetaMTAMail::getHTMLBody() to make it clear that it @return string|null

This revision is now accepted and ready to land.Jun 3 2023, 17:11
src/applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php
68

This one probably also needs updated I'm guessing.

191

Looks like this might be nullable too

avivey planned changes to this revision.Jun 24 2023, 19:22
This revision is now accepted and ready to land.Jun 30 2023, 08:23
src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
77 ↗(On Diff #1036)

The default for most args is "null", so it was crashing here. This was just a default-check anyway,

src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php
77 ↗(On Diff #1036)

Yep. Also I wonder why they have not used also $args->getArg('type', $something_else); before.