Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1093

InvalidArgumentException::invalidType() should ensure $expectedType is not an empty array

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None

      b2cd286 for PHPLIB-511 added support for passing an array of strings as the $expectedType parameter for InvalidArgumentException::invalidType(). The switch statement that builds the exception message doesn't gracefully handle an array of zero elements. That should either be handled as an error or an empty string.

            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: