aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-11-15 10:09:59 +0100
committerprovokateurin <kate@provokateurin.de>2024-11-15 10:09:59 +0100
commitdd0ed02b91d553c67c9bba27025e65910a69b643 (patch)
tree24e71b8fcfefee6b21f4019133072b650eabaf10 /lib/private
parentd61d62b64f3cb1a22cc322fc747f2af3319280c3 (diff)
downloadnextcloud-server-dd0ed02b91d553c67c9bba27025e65910a69b643.tar.gz
nextcloud-server-dd0ed02b91d553c67c9bba27025e65910a69b643.zip
feat(Dispatcher): Add debug log for controller methods returning raw data not wrapped in Responsefeat/dispatcher/log-raw-response-data
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index b7952df8d19..e2750e30fa9 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -208,6 +208,10 @@ class Dispatcher {
$response = \call_user_func_array([$controller, $methodName], $arguments);
$this->eventLogger->end('controller:' . get_class($controller) . '::' . $methodName);
+ if (!($response instanceof Response)) {
+ $this->logger->debug($controller::class . '::' . $methodName . ' returned raw data. Please wrap it in a Response or one of it\'s inheritors.');
+ }
+
// format response
if ($response instanceof DataResponse || !($response instanceof Response)) {
// get format from the url format or request format parameter