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

Clarify return type for WriteConcernError and WriteError getInfo() methods

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.8.0-beta2, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The return value of the getInfo method for WriteConcernError and WriteError is documented as mixed (likely because it is stored internally as a zval); however, it is only ever initialized from a BSON document. Therefore, the return type can more correctly be stated as object|null.

      This came up while investigating a PR comment for PHPC-1571.

            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: