Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5770

Inf and Nan values does not encoded in php library

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.20.0
    • None
    • PHP - Library
    • None

    Description

      Methods \Thrift\Protocol\TJSONProtocol::writeJSONDouble and \Thrift\Protocol\TSimpleJSONProtocol::writeJSONDouble uses for value encoding function 
      json_encode which give an error "Inf and NaN cannot be JSON encoded". Because json_encode does not throw exception code works. This error can be seen by function json_last_error_msg or if flag THROW_ERROR_ON_EXCEPTION will be provided to json_encode
      Founded during writing tests for php library 

      https://github.com/apache/thrift/pull/2951/files#r1536763203

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sveneld Volodymyr Panivko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: