Closed
Bug 1710951
Opened 5 years ago
Closed 5 years ago
Phabricator Emails: Typed property PublicPing::$mainCommentMessage must not be accessed before initialization
Categories
(Conduit :: Phabricator, defect, P3)
Conduit
Phabricator
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mhentges, Assigned: mhentges)
Details
(Keywords: conduit-triaged)
Attachments
(1 file)
Sentry ticket.
This is regressed from this patch. Note the one part of the commit message:
However, this doesn't mean that this can't cause
regressions: PHPDocs aren't enforced at runtime, while PHP typings are.
So, the additional strictness may cause unexpected surprises after
this lands.
Unexpected surprise confirmed.
To reproduce:
- Ping a user in an inline comment, submit.
- When
PublicPingis instantiated,setMainComment()is never called, sointoPublicBody()throws an error when the "uninitialized"mainCommentMessageproperty is used
| Assignee | ||
Comment 1•5 years ago
|
||
Now that PHP is tracking the typings, it's no longer accepting
the implicit null state of mainCommentMessage.
So, we explicitly set it to null in the constructor
so that PHP knows that we deliberately are ok with it being
used without being set.
Updated•5 years ago
|
Assignee: nobody → mhentges
Status: NEW → ASSIGNED
| Assignee | ||
Updated•5 years ago
|
Keywords: conduit-triaged
Priority: -- → P3
| Assignee | ||
Updated•5 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•