Open donquixote opened 1 year ago
I see two options:
Btw, I don't know if "Bug report" was correct here, but it seemed like the least wrong option.
One of the apps I use has a middleware that indeed returns NULL. I will communicate with the authors separately, no need to go into detail here.
Cc: @ChristophWurst
⚠️ This issue respects the following points: ⚠️
Bug description
The documentation on
OCP\AppFramework\Http\Response\Middleware::afterException()
has mixed information about whether it may return NULL.The doc text suggests that NULL is allowed.
But the return type declaration says only Response is allowed:
The MiddlewareDispatcher::afterException() will break if the middleware returns NULL:
Steps to reproduce
OCP\AppFramework\Http\Response\Middleware
, and use it.afterException()
return NULL, as might be allowed when looking at the wrong part of the documentation.Expected behavior
MiddlwareDispatcher will skip the middleware.
Actual behavior
TypeError: OC\AppFramework\Middleware\MiddlewareDispatcher::afterException(): Return value must be of type OCP\AppFramework\Http\Response, null returned
Installation method
None
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response