Page MenuHomePhabricator

Double assignment to ParserOutput->mExtensionData
Closed, DuplicatePublicBUG REPORT

Description

I believe there is an unnecessary assignment to ParserOutput->mExtensionData in ParserOutput::initFromJson. Both times it uses the same source data, but first it unserializes, then it directly assigns. I believe that unserializing is side-effect free, so I believe unserializing is wasted as its assignment is immediately overwritten.
This occurs at lines 1779-1780 of includes/parser/ParserOutput.php in master.

I can submit a patch to fix this, but I'm not sure if the current end behavior (direct assignment) is the desired behavior, or if it's a bug and needs to be removed so the unserialize behavior will work again.