Skip to content

Commit 7c80ac7

Browse files
Millie Chenfacebook-github-bot
Millie Chen
authored andcommitted
codemod cases of string to class conversion (6/7)
Summary: `phps ClassnameToClassCodemod --try-cn-to-cls --cn-to-cls --specific-dir` on directories flib/realtime through flib/thrift Reviewed By: vassilmladenov Differential Revision: D70997958 fbshipit-source-id: 23412d8559c94b98c230015e33d519f2b76e9cea
1 parent ced3722 commit 7c80ac7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thrift/lib/hack/src/protocol/ThriftSerializationHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public static function readStructHelper(
339339
break;
340340
case TType::STRUCT:
341341
$cls = Shapes::at($tspec, 'class');
342-
$struct = new $cls();
342+
$struct = HH_FIXME::tryClassnameToClass($cls) |> new $$();
343343
$xfer += PHPism_FIXME::castForArithmetic($struct->read($protocol));
344344
$object = $struct;
345345
break;

0 commit comments

Comments
 (0)