Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-2085

CJSON->decode corrupt big length data

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • 1.8.2
    • 1.8.1, 1.8.2
    • Frontend (F)
    • None

      If any field length in json string longer then ~60000 symbols then field after CJSON->decode will be empty
      Fix: I don't fixed it in CJSON class, in php>5.2.0 internal function json_decode presents. For compatible with old php versions i do this for example:
      if(!function_exists("json_decode"))

      { //There is a bug in CJSON.decode. If data longer than ~60000 symbols it will be decoded as empty. json_decode function is internal php function since 5.2.0 and have no this bug $json = new CJSON(); $rcv = $json->decode($reply, true); }

      else

      { $rcv = json_decode($reply, true); }

            Unassigned Unassigned
            inakrin Fyodor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: