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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 1.16.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: