Page MenuHomePhorge

fix strlen in PhabricatorMailManagementShowOutboundWorkflow
ClosedPublic

Authored by avivey on Jun 3 2023, 16:30.

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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

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

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