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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: