zend-expressive-hal icon indicating copy to clipboard operation
zend-expressive-hal copied to clipboard

Link with `null` attribute

Open marcosh opened this issue 7 years ago • 1 comments

Creating a Link with a null attribute, I get an InvalidArgumentException. I'm not 100% sure about it but I guess that having null attributes should be allowed in Hal links

Code to reproduce the issue

new Link('a', 'b', false, ['c' => null]);

Expected results

I would expect to get a Link with a c attribute with a null value

Actual results

An InvalidArgumentException with message Zend\\Expressive\\Hal\\Link expects the $value to be a PHP primitive or array of strings; received NULL is thrown

marcosh avatar Oct 08 '18 12:10 marcosh

This repository has been closed and moved to mezzio/mezzio-hal; a new issue has been opened at https://github.com/mezzio/mezzio-hal/issues/6.

weierophinney avatar Dec 31 '19 20:12 weierophinney