When I access the route via Fiddler and I put the Accept header with either application/xml or application/json, it works fine. So this probably happen only if the Accept header is missing.
Hard to say whether this should be fixed in Nette Strings class or in ResponseFactory class.
I tried to use this library on Nette 2.3.8, PHP 7.0.2. I ran into a problem in the file::method.
There is a call to:
which is called with the empty string "" parameter in $formatMime in the last iteration.
that gives me this warning:
This happens when accessing the REST route from Chrome browser. The $contentType parameter for the method getPreferredContentType is:
When I access the route via Fiddler and I put the Accept header with either application/xml or application/json, it works fine. So this probably happen only if the Accept header is missing.
Hard to say whether this should be fixed in Nette Strings class or in ResponseFactory class.