Skip to content

Commit 192d29c

Browse files
viratyosinmeta-codesync[bot]
authored andcommitted
manually fix truthiness in flib/thrift/core/protocol/simplejson/TSimpleJSONProtocol.php
Summary: the codemod skips this file by default Reviewed By: vassilmladenov Differential Revision: D95602657 fbshipit-source-id: e1ef8abb2266f92873916b6533de487f2c79b365
1 parent d6fd5f6 commit 192d29c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

third-party/thrift/src/thrift/lib/hack/src/protocol/simplejson/TSimpleJSONProtocol.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ protected function readNumStr()[write_props]: (string, int) {
637637
}
638638
$str = $this->buffer->readAll($count);
639639
if (
640-
!PHP\fb\preg_match_simple(
640+
!HH\legacy_is_truthy(PHP\fb\preg_match_simple(
641641
'/^[+-]?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/',
642642
$str,
643-
)
643+
))
644644
) {
645645
throw new TProtocolException(
646646
'TSimpleJSONProtocol: Invalid json number '.$str,

0 commit comments

Comments
 (0)