From 37c3db0cc50b1158d5224acf9da0760881712212 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Sun, 4 Jun 2023 13:58:32 +0200 Subject: [PATCH] Correctly fix return of Connector and Loader in non-cors mode (#507) --- src/Connector/ElFinderConnector.php | 2 +- src/Loader/ElFinderLoader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Connector/ElFinderConnector.php b/src/Connector/ElFinderConnector.php index 0feb73c..d60ca2e 100644 --- a/src/Connector/ElFinderConnector.php +++ b/src/Connector/ElFinderConnector.php @@ -11,7 +11,7 @@ public function run($queryParameters = null) if (null === $queryParameters) { $queryParameters = $_GET; } - exit(json_encode($this->execute($queryParameters))); + return $this->execute($queryParameters); } public function execute($queryParameters) diff --git a/src/Loader/ElFinderLoader.php b/src/Loader/ElFinderLoader.php index 7758535..79f96ff 100644 --- a/src/Loader/ElFinderLoader.php +++ b/src/Loader/ElFinderLoader.php @@ -95,7 +95,7 @@ public function load(Request $request) if ($this->config['corsSupport']) { return $connector->execute($request->query->all()); } else { - $connector->run($request->query->all()); + return $connector->run($request->query->all()); } }