Issue Bug Closed

#77989PSR-7 ServerRequest array properties must be initialized as arrays

Patrik Karisch 09/19/16, 03:55 updated 10/17/17, 23:24

Description

All the PSR-7 Request/Response object properties which are expected to be arrays when accessed must be initialized as arrays from the beginning. Otherwise this raises errors, when e.g. queryParams or attributes are accessed, which may not be initialized from outside with the correspoding `with*()` method.

Since the PSR-7 implementation is inspired by `phly/http/` which is superseded by `zend-diactoros`, it’s perfectly to fix this, as this is fixed in diactoros too (Comparing the abandoned phly implementation against current diactoros).

Reviews 2