Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-748

CursorID is not properly expressed on 32-bit platforms

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0-alpha1, 1.2.0
    • Affects Version/s: 1.1.8
    • Component/s: None
    • Labels:
      None

      Cursor::__toString() uses RETVAL_LONG() to convert the cursor ID to a string. On a 32-bit platform, the uint64_t cannot be fully represented in the zval, which makes this an inaccurate conversion. We should use the same logic found in UTCDateTime::__toString() (i.e. sprintf() with an type-appropriate pattern).

      Similarly, var_dump() needs to print the cursor ID as a string on 32-bit platforms. It currently uses an integer on all platforms.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: